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.
相关问题
- I want to trace logs using a Macro multi parameter
- Tomcat and SSL Client certificate
- Error message 'No handlers could be found for
- convert logback.xml to log4j.properties
- Django management command doesn't show logging
相关文章
- Tomcat的User信息可以存储到数据库中吗?
- tomcat的server.xml支持从Oracle中获取数据吗?
- web项目,Resonse Header发生解析错误,请大牛帮忙看看究竟是哪里的问题?
- Apache+Tomcat+JK实现的集群,如果Apache挂了,是不是整个服务就挂了?
- linux环境部署jpress,创建数据库时提提示连接失败
- how do I log requests and responses for debugging
- XCopy or MOVE do not work when a WCF Service runs
- Making a two way SSL authentication between apache
In Windows you can go to go to
Program Files\Apache Software Foundation\Tomcat6.0\bin
and runtomcat6w.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 to25MBs
before it rotates to a new log file.If you wanted the limit to be 10 megs, you'd use the following conventions
With log4j:
With JUL:
http://tomcat.apache.org/tomcat-5.5-doc/logging.html
http://docs.oracle.com/javase/1.4.2/docs/api/java/util/logging/FileHandler.html