How to limit stdout.log file size when running Apache Tomcat as Windows service?

后端 未结 2 1219
余生分开走
余生分开走 2021-02-20 18:22

Is there any way that I could limit the size of the stdout.log file in Apache Tomcat? When running as a service system.out statements go to the stdout

2条回答
  •  野性不改
    2021-02-20 19:04

    In Windows you can go to go to Program Files\Apache Software Foundation\Tomcat6.0\bin and run tomcat6w.exe as administrator Under the Java tab, in the Java Options section add the following: -Djava.util.logging.FileHandler.limit=25000000

    This will set the default stdout.log file to 25MBs before it rotates to a new log file.

提交回复
热议问题