One logfile per run with log4j

后端 未结 4 1248
梦谈多话
梦谈多话 2020-12-03 11:26

How do you configure log4j.properties to have exactly one logfile per run of an app. I\'ve read that you should use a timestamp in the filename but that will create many fil

4条回答
  •  醉话见心
    2020-12-03 11:53

    Combine the answer of Udo Klimaschewski and the answer from this question in order to get the desired result.

    1. add the property append = false
    2. add a current.time system property and use it in the file name

提交回复
热议问题