Java – use log4j to create new log files every day
•
Java
I want to use log4j in my java project. What configuration should I provide
log4j.appender.FILE = org.apache.log4j.DailyRollingFileAppender log4j.appender.FILE.File = ${log}/log.out log4j.appender.FILE.DatePattern = '.' yyyy-MM-dd-a
It creates new files every day, but it appends a date to the file name Please help me Thank you in advance
Solution
I think you want the daily rolling file appender (geedubb links to the log4j documentation about it)
Here is another stackoverflow question like yours
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码