jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gorman, Mitch " <mgor...@cbs.com>
Subject RE: quieting logs
Date Sat, 26 Nov 2005 13:52:02 GMT
I don't recall seeing anyone respond to this...

 

My app has a properties file, which it reads prior to starting up JCS (or
much of anything else, either).  In it, I've got the following:

 

 

# A1 -- console

log4j.appender.A1=org.apache.log4j.ConsoleAppender

log4j.appender.A1.layout=org.apache.log4j.PatternLayout  

log4j.appender.A1.layout.ConversionPattern=%d{dd MMM
HH:mm:ss:SSS}\t%-5p\t%t\t%C{1}\t%L:\t%m%n

  

# RF --file appender

log4j.appender.RF=org.apache.log4j.RollingFileAppender

log4j.appender.RF.File=/net/gorman/workspace.3.1/ce_bodysrv/JBodyServer.log

log4j.appender.RF.layout=org.apache.log4j.PatternLayout  

log4j.appender.RF.layout.ConversionPattern=%d{dd MMM
HH:mm:ss:SSS}\t%-5p\t%t\t%c\t%C{1}\t%L:\t%m%n

log4j.appender.RF.MaxFileSize=10MB

log4j.appender.RF.MaxBackupIndex=5

 

# HTML -- html output

log4j.appender.HTML=org.apache.log4j.RollingFileAppender

log4j.appender.HTML.File=/net/gorman/workspace.3.1/ce_bodysrv/JBodyServer.lo
g.html

log4j.appender.HTML.layout=org.apache.log4j.HTMLLayout

 

log4j.debug=true

log4j.rootCategory=trace

log4j.category.stderr=debug,A1,RF

log4j.category.stdout=debug,A1,RF

log4j.category.JBodyServer=debug,A1,RF

log4j.category.com.cbssports.jbodysrv=debug,A1,RF

 

 

#     JCS Config

log4j.category.org.apache.jcs=info,A1,RF

JBodyServer.jcs_config_file=/net/gorman/workspace.3.1/ce_bodysrv/configurati
on/JBodyServer.jcache.ccf

 

 

      Note the log4j.category.org.apache.jcs setting.  This tells log4j to
direct jcs output at info level and above to both the A1 and RF appenders.
That is probably the setting that you want, although you could also turn
that up to warn, to really cut down the output.  

 

      Note also the log4j.debug setting.  The properties file is read with
the following line of code, which makes it possible to modify the log4j
configuration at runtime and have log4j pick up the changes.  

 

        PropertyConfigurator.configureAndWatch(this.configurationFile,
getAppProperty("logwatchdelay", 60) * 1000);

 

 

HTH

 

-----Original Message-----
From: Tim Cronin [mailto:tcronin@interwoven.com] 
Sent: Tuesday, November 22, 2005 10:45 AM
To: JCS Users List
Subject: quieting logs

 

I'm using log4j in my app but I'm unable to quiet the initial startup.

 

I have the following in my log4j.xml but it still dumps the startup

info.

 

<category name="org.apache.jcs.engine">

        <priority value="WARN" />

  </category>

 

---------------------------------------------------------------------

To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org

For additional commands, e-mail: jcs-users-help@jakarta.apache.org


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message