It is not clear from the docs how to limit the size of the tomcat stdout log file. We are using log4j. Isnt there a way to get log4j properties to apply to the stdout log file We have a customer who is running out of disk space due to 100GB+ stdout log files which are logging stack traces from network errors which they can't fix like: ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error at org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:373) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:398) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:318) at org.apache.coyote.tomcat5.OutputBuffer.writeBytes(OutputBuffer.java:401) at org.apache.coyote.tomcat5.OutputBuffer.write(OutputBuffer.java:388) at org.apache.coyote.tomcat5.CoyoteOutputStream.write(CoyoteOutputStream.java:76) at com.haht.io.OutputStream.write(OutputStream.java:157) at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(Unknown Source) at sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(Unknown Source) at sun.nio.cs.StreamEncoder$CharsetSE.implFlush(Unknown Source) at sun.nio.cs.StreamEncoder.flush(Unknown Source) at java.io.OutputStreamWriter.flush(Unknown Source) at java.io.PrintWriter.flush(Unknown Source) at com.haht.io.HtmlWriter.print(HtmlWriter.java:77) at Suite.HsWorkflowTasks.run(HsWorkflowTasks.java:362) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.haht.project.JavaApplication.runDynamicPage(JavaApplication.java:109) at com.haht.project.Application.handleDynamic(Application.java:2626) at com.haht.project.Application.processValidRequest(Application.java:2541) at com.haht.project.Application.handleRequest(Application.java:2401) at com.haht.project.Application.doGet(Application.java:2106) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Unknown Source)
It's the application that is logging these things to standard output. Plese use tomcat-user instead.
Hi, The response was incomplete and not understood. What do you mean use tomcat-user? Are you saying there is some configuration setting to get the logs to log somewhere as and tomcat-user is an alias within the tomcat runtime? Are you saying that tomcat-user is another bugzilla area? No comprende.
Everything you wish to know about tomcat-user http://jakarta.apache.org/tomcat/faq/tomcatuser.html
I know it is the application that is logging this stuff. I want to know from the people who WRITE TOMCAT how to tell TOMCAT that it's LOGFILE should have some size limits like LOG4J does. Assume I'm not stupid and that you guys aren't reading what I am typing. I am looking for an answer from a developer please.
Bugzilla is NOT a support forum. It is for resolving bugs. The issue described is a configuration problem which can be answered via the tomcat-users mailing list (or archives). See http://jakarta.apache.org/tomcat/faq/logging.html for logging help first - it answers this question.