Log4j Rolling file appender issue

Viewed 18

In Rolling file appender configuration file are appending with current date but I hadn't configured it. New file are not created, once it reaches the maximum file size. Also it actually deletes the existing log data and rewrites the log data again to same file. But excepted is, it should create 10 file of each 10MB with the last 100MB of log files. So what change should be made , in order to save the file without date and also store the log in file1.txt, file2.txt,etc., without losing the previous log details.

log4j.rootCategory=STDOUT, ERROR, INFO, console
# Direct log messages to a log file`enter code here`
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=/app/platform/executor.log
log4j.appender.file.MaxFileSize=10MB
log4j.appender.file.MaxBackupIndex=10
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n ```
 


0 Answers
Related