Log4j2 overwrites past day log file

后端 未结 4 1915
闹比i
闹比i 2021-01-15 12:01

I\'m using Log4j2 ver 2.3

log4j2.xml looks like:




    

        
4条回答
  •  臣服心动
    2021-01-15 12:56

    Try adding an auto-increment variable to your file pattern (%i). This worked fine for me.

    filePattern="${sys:catalina.base}/logs/catalina.%d{yyyy-MM-dd}.%i.log"
    

提交回复
热议问题