0
   <blink>
    log4j.rootLogger=DEBUG, stdout, file
    log4j.appender.file=org.apache.log4j.RollingFileAppender
    log4j.appender.file.File=C:\\Sample\\ab.log 
    log4j.appender.MaxFileSize=5MB
    log4j.appender.MaxBackupIndex=10
    log4j.appender.file.layout=org.apache.log4j.PatternLayout
    log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss}
    </blink>

/how to add date to file name/ ## how can i add date to file name(ab.log) like ab.2016.10.10.log ##

n220
  • 1
  • Possible duplicate of [Setting a log file name to include current date in Log4j](http://stackoverflow.com/questions/192456/setting-a-log-file-name-to-include-current-date-in-log4j) – Amin J Oct 19 '16 at 03:48
  • Possible duplicate of [What is the difference between log4j RollingFileAppender vs DailyRollingFileAppender](http://stackoverflow.com/questions/5884705/what-is-the-difference-between-log4j-rollingfileappender-vs-dailyrollingfileappe) – Pavan Kumar Jorrigala Oct 19 '16 at 03:51

0 Answers0