title: Apache Tomcat Windows stdout/stderr configuration
body: <p>Like many other members before me, I have some questions surrounding configuring Apache Tomcat logging on Windows.  To be more specific, my questions surround the proper method(s) for limiting the size and number of log files that are created for stderr/stdout of the Apache Tomcat server as a whole.<br /></p>
  
  <p>My Java knowledge is pretty much limited to whatever I've been able to find on the web in searches.<br /></p>
  
  <p>What I believe I understand is this:
  <li>The Apache Tomcat service on Windows defaults to the -std(out|err).yyyy-mm-dd.log</li>
  <li>The Apache Tomcat service uses the following options in the Java startup definition:
  <pre>  -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
    -Djava.util.logging.config.file=&lt;tomcat_home&gt;\conf\logging.properties</pre></li>
  <li>The Apache Tomcat service defines the majority of its core logging options within the logging.properties file.</li><br /></p>
  
  <p>Is there a proper configuration/directive/option that can/should be added to the logging.properties file to limit the size, number, count, etc. of the std(out|err) log files?<br /></p>
  
  <p>My main confusion is with how the loggers and handlers are defined within the logging.properties file with respect to the Tomcat service itself.<br /></p>
  
  <p>If this has been answered in another thread that I didn't find before posting this, please redirect me.  I have tried to follow along with Apache's documentation for logging (<a href="https://tomcat.apache.org/tomcat-9.0-doc/logging.html" rel="nofollow noreferrer">https://tomcat.apache.org/tomcat-9.0-doc/logging.html</a>) but I don't know if I can simply add options like <code>maxDays</code>, <code>count</code>, and <code>maxCapSize</code> (or whatever the appropriate option and value should be) directly into the &lt;tomcat_home&gt;\conf\logging.properties file or if I have to use a different way?<br /></p>
  
  <p>Any help or direction that gets me to a better understanding of this and how to accomplish my end goal of limiting the number and size of std(out|err) log files is and will be greatly appreciated!<br /></p>
  
  <p>Thanks!<br />
  Greg</p>