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 file. But I need to have a mechanism where I can control the size of the stdout log file by creating new files after reaching 2GB size or something like that. As of now a new file is created everyday but that is not sufficient.
Once Apache Tomcat starts, it will create several log files in the /opt/bitnami/tomcat/logs directory. The main log file is the catalina. out file where you can find error messages. On some platforms, you may need root account privileges to view these files.
By default, the Tomcat HTTP Access Logs are stored in the dotserver/tomcat-X.x/logs/ folder within the dotCMS distribution, and the files are named dotcms_access. YYYY-MM-DD. log, where the YYYY-MM-DD in the file name is replaced by the date of the log file.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With