I have a log file that I would like only "trace" messages written to it.
However when I create my properties file such that the logger specifies
the trace level, I also get the debug, info, etc. messages in that log
file.  Is there a way to enforce just trace messages?

 

My properties file looks like:

 

log4j.category.com.xxx.businesslogic =trace, lcdlog

 

log4j.appender.lcdlog=org.apache.log4j.FileAppender

log4j.appender.lcdlog.File=/data/logs/lcd.log

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

log4j.appender.lcdlog.layout.ConversionPattern=[%d{MM/dd/yyyy HH:mm:ss}]
%-p - %m%n

 

And of course I have another appender to handle the other log messages.

 

Is it possible to set things up in the properties file to only get the
trace messages?

I'm using log4j 1.2.15 on a linux system.

 

Thanks,

Beth

Reply via email to