title: Where to configure internal tomcat7 stdout/stderr log files
body: <p>I'm using Apache Tomcat 7.0.40 with Log4j config according to <a href="http://tomcat.apache.org/tomcat-7.0-doc/logging.html" rel="nofollow noreferrer">http://tomcat.apache.org/tomcat-7.0-doc/logging.html</a></p>
  <p>Everything's working as expected, except that some log files are created, which are actually not configured in my <code>log4j.properties</code>:</p>
  <pre class="lang-sh prettyprint-override"><code>log4j.rootLogger=INFO, CATALINA
  
  # Define all the appenders
  log4j.appender.CATALINA=org.apache.log4j.RollingFileAppender
  log4j.appender.CATALINA.File=${catalina.base}/logs/catalina.log
  log4j.appender.CATALINA.MaxFileSize=3MB
  log4j.appender.CATALINA.MaxBackupIndex=10
  log4j.appender.CATALINA.Append=true
  log4j.appender.CATALINA.Encoding=UTF-8
  log4j.appender.CATALINA.layout = org.apache.log4j.PatternLayout
  log4j.appender.CATALINA.layout.ConversionPattern = %d [%t] %-5p %c- %m%n
  
  log4j.appender.LOCALHOST=org.apache.log4j.RollingFileAppender
  log4j.appender.LOCALHOST.File=${catalina.base}/logs/localhost.log
  log4j.appender.LOCALHOST.MaxFileSize=3MB
  log4j.appender.LOCALHOST.MaxBackupIndex=10
  log4j.appender.LOCALHOST.Append=true
  log4j.appender.LOCALHOST.Encoding=UTF-8
  log4j.appender.LOCALHOST.layout = org.apache.log4j.PatternLayout
  log4j.appender.LOCALHOST.layout.ConversionPattern = %d [%t] %-5p %c- %m%n
  
  log4j.appender.MANAGER=org.apache.log4j.RollingFileAppender
  log4j.appender.MANAGER.File=${catalina.base}/logs/manager.log
  log4j.appender.MANAGER.MaxFileSize=3MB
  log4j.appender.MANAGER.MaxBackupIndex=10
  log4j.appender.MANAGER.Append=true
  log4j.appender.MANAGER.Encoding=UTF-8
  log4j.appender.MANAGER.layout = org.apache.log4j.PatternLayout
  log4j.appender.MANAGER.layout.ConversionPattern = %d [%t] %-5p %c- %m%n
  
  log4j.appender.HOST-MANAGER=org.apache.log4j.RollingFileAppender
  log4j.appender.HOST-MANAGER.File=${catalina.base}/logs/host-manager.log
  log4j.appender.HOST-MANAGER.MaxFileSize=3MB
  log4j.appender.HOST-MANAGER.MaxBackupIndex=10
  log4j.appender.HOST-MANAGER.Append=true
  log4j.appender.HOST-MANAGER.Encoding=UTF-8
  log4j.appender.HOST-MANAGER.layout = org.apache.log4j.PatternLayout
  log4j.appender.HOST-MANAGER.layout.ConversionPattern = %d [%t] %-5p %c- %m%n
  
  log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
  log4j.appender.CONSOLE.Encoding=UTF-8
  log4j.appender.CONSOLE.layout = org.apache.log4j.PatternLayout
  log4j.appender.CONSOLE.layout.ConversionPattern = %d [%t] %-5p %c- %m%n
  
  # Configure which loggers log to which appenders
  log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=INFO, LOCALHOST
  log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager]=\
    INFO, MANAGER
  log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager]=\
    INFO, HOST-MANAGER
  </code></pre>
  <p>The files which get created although they are NOT in my configuration are:</p>
  <ul>
  <li>commons-daemon.<em>yyyy-MM-dd</em>.log</li>
  <li>tomcat7-stderr.<em>yyyy-MM-dd</em>.log</li>
  <li>tomcat7-stdout.<em>yyyy-MM-dd</em>.log</li>
  </ul>
  <p>As you see they use a <code>DailyRollingFileAppender</code>, which is not desired, as I need a maintenance free system. So I would prefer a <code>RollingFileAppender</code> with <code>maxBackupIndex</code> to prevent unlimited growth of the logs.</p>
  <p>So where can I configure the <code>stdout</code>, <code>stderr</code> and <code>commons-daemon</code> logs? Is there some configuration somewhere or can I override the config with my own Log4j config? Thx</p>