I am using log4j for logging, and a property file for configuration. Currently, my log files are too big (3.5 GB is too large for a log file). So think I need to use Ro
When we need log files to be rolled on a daily basis, we should be using DailyRollingFileAppender instead of RollingFileAppender. You do not need to specify the MaxFileSize limit instead only DatePattern is enough for rolling files based on frequency. I have tried the below configuration in log4j.properties file for rolling log files every minute.
log4j.appender.infoAppender=org.apache.log4j.DailyRollingFileAppender
log4j.appender.infoAppender.Threshold=INFO
log4j.appender.infoAppender.DatePattern='.' yyyy-MM-dd HH-mm
log4j.appender.infoAppender.File=C:/logs/info.log