Howdy,
It'd be a good idea for you to define a root logger, as in
log4j.rootLogger=DEBUG, chart

Then your personal classes, e.g.
log4j.logger.com.neuroquest.cais.web.velocity.RunningChart=DEBUG

Then your appender properties for the chart appender, as below.  They
seem to make sense.  One thing is that I think properties files require
\ before space, so conversion pattern=[%x\ (%c{1})]\ %m%n

I think the stuff below is missing the rootLogger.

>log4j.category.com.neuroquest.cais.web.velocity.RunningChart=DEBUG,
chart
>log4j.appender.chart=org.apache.log4j.RollingFileAppender
>log4j.appender.chart.File=/tmp/chart.log
>log4j.appender.chart.MaxFileSize=100KB
>log4j.appender.chart.MaxBackupIndex=3
>log4j.appender.chart.layout=org.apache.log4j.PatternLayout
>log4j.appender.chart.layout.ConversionPattern=[%x (%c{1})] %m%n

>Also, I'd like to know how to configure only error and fatal to console
>output, and how to turn on/off everthing else into the file appender.

There are a couple of ways to do this.  My preference is to have the
lower priority appender (in your case the file appender) get everything,
not just the DEBUG, INFO, WARN, but also the ERROR and FATAL.  Makes
things much easier to analyze.  So your just set the threshold for the
file appender to DEBUG, and that for the console appender to ERROR.
log4j.appender.chart.Threshold=DEBUG
log4j.appender.console.Threshold=ERROR

See the javadoc for PropertyConfigurator and the Threshold property for
more details.

Yoav Shapira
Millennium ChemInformatics

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to