I'm quite new to log4j and have managed to create the logs for my code. But what I need is, a new file to be created for each run, rather than appending the logs to the same file.
Below are the properties I'm setting (found somewhere on google). Please suggest changes, so that new file will be created with the timestamp after each run.
// Here we have defined root logger
log4j.rootLogger=INFO,R,HTML
// Here we define the appender
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.HTML=org.apache.log4j.FileAppender
// Here we define log file location
log4j.appender.R.File=./Logs/LastRunLog.log
log4j.appender.HTML.File=./Logs/LastRunLog.html
// Here we define the layout and pattern
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d - %c -%p - %m%n
log4j.appender.HTML.layout=org.apache.log4j.HTMLLayout
log4j.appender.HTML.layout.Title=Application log
log4j.appender.HTML.layout.LocationInfo=true