Create 1 log file per day

Add the followings in your Log4j configuration/properties file:

log4j.rootLogger=info, R
log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
log4j.appender.R.File=filename
log4j.appender.R.DatePattern='.'yyyy-MM-dd'.log'
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS zzz} %5p %c{1}:%L - %m%n

The filename of the log file will look like this:

filename
filename.2010-01-21.log
filename.2010-01-22.log
filename.2010-01-23.log