How to configure log4j to only keep log files for the last seven days?

前端 未结 14 1505
北海茫月
北海茫月 2020-12-02 14:01

I have the following logging problem with several Java applications using log4j for logging:

I want log files to be rotated daily, like

         


        
14条回答
  •  旧时难觅i
    2020-12-02 14:39

    Inspite of starting a chrone job, for the task, we can use log4j2.properties file in config folder of logstash. Have a look at the link below, this will be helpful.

    https://github.com/elastic/logstash/issues/7482

提交回复
热议问题