• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disabling Tomcat logging to CONSOLE

 
Alex Fishchuk
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys...
I spent a couple of hours looking for a proper way to DISABLE CONSOLE LOGGING in tomcat 4.1.x ....
here is the solution...
1. place commons-logging.properties and log4j.properties files in <TOMCAT_HOME>\common\classes
[commons-logging.properties]
org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jFactory

[log4j.properties]
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
log4j.rootLogger=OFF, stdout

that would disable concole logging and give u fine grained control over logging config
enjoy
:-))
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic