Rotate log file for every 100 MB size

后端 未结 1 1161
醉话见心
醉话见心 2021-01-27 11:25

I have windows batch script which starts a java process. This process runs for a week, the problem is ow a days log file of this process is very huge(around 10 GB). I am facing

相关标签:
1条回答
  • 2021-01-27 12:18

    If you are logging in log4j you can configure the max file size. See a previous question here

    e.g. In the java (rather than the batch file) or in log4j's configuration file *using a suitable max size):

    log4j.appender.file.MaxFileSize=1MB
    
    0 讨论(0)
提交回复
热议问题