here's one that that does debug lvl logging, creates new files every day, and writes it to D:/mylog.log
Code:
log4j.rootLogger=debug,DRF
#log4j.rootLogger=info, DRF
#log4j.rootLogger=warn, C
log4j.appender.DRF.File=D:/mylog.log
# Setup the ConsoleAppender
log4j.appender.C=org.apache.log4j.ConsoleAppender
# Specify the layout (SimpleLayout or PatternLayout)
log4j.appender.C.layout=org.apache.log4j.PatternLayout
log4j.appender.C.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} [%-5p] %c - %m%n
# Setup the DailyRollingFileAppender
log4j.appender.DRF=org.apache.log4j.DailyRollingFileAppender
# Rollover log file at the start of each week
log4j.appender.DRF.DatePattern='.'yyyy-ww
# Specify the layout (SimpleLayout, PatternLayout, or HTMLLayout)
log4j.appender.DRF.layout=org.apache.log4j.PatternLayout
log4j.appender.DRF.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} : [%-5p] %c %x - %m%n