I am using this log4j.properties
log4j.rootCategory=Info, A1 # A1 is a DailyRollingFileAppender log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender log4j.appender.A1.file=D:/MyWeb.log log4j.appender.A1.datePattern='.'yyyy-MM-dd log4j.appender.A1.append=true log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%-22d{dd/MMM/yyyy HH:mm:ss} - %m%n
I want to display logs in the Date Wise method, so I use DailyRollingFileAppender . But the problem is that this log file cannot currently store a lot of data (which means that a lot of requests are being executed on this day), it loses the previous log data
I tried using the MaxFileSize option:
log4j.appender.A1.MaxFileSize=10MB
But on the server console, its error is that the MaxFileSize property is not supported.
Please tell me if there is another way for the log to look like a date and it can store as much data as possible.
Pawan source share