logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Deboy" <sde...@comotivsystems.com>
Subject RE: Chainsaw LogFilePatternReceiver
Date Mon, 21 Jul 2008 22:18:12 GMT
timeStampFormat=MM-dd-yy HH:mm:ss

logFormat=TIMESTAMP LEVEL NDC LOGGER - MSG

filter: don't define it unless you have a really big log file and only
want to see a subset of the logging events (note the default chainsaw
tab rolls the events, only displaying the most recent 5000..you can
change this in application-wide prefs).  If you need a filter, see the
Chainsaw tutorial for an explanation of the expression syntax used by
that filter (and by color/search/refine focus filters inside Chainsaw
itself).

Some comments:

%-5p results in severity level names getting cut short in the log file,
so some non-DEBUG levels will not be parseable (will display as DEBUG).
If you use %p this won't happen.

You should use a delimiter other than space around %x, since there may
be spaces in the NDC value itself and the receiver won't parse the
results correctly (maybe use a dash instead).

In general, spaces aren't very good delimiters because it's likely they
will show up in your log where you don't expect them.
 

Scott Deboy
Principal Engineer
COMOTIV SYSTEMS
111 SW Columbia Street Ste. 950
Portland, OR  97201
Office: 503.224.7496
Direct Line: 503.821.6482
Cell: 503.997.1367
Fax: 503.222.0185
sdeboy@comotivsystems.com
www.comotivsystems.com


-----Original Message-----
From: abc abc [mailto:new2maven@yahoo.com] 
Sent: Monday, July 21, 2008 2:47 PM
To: log4j-user@logging.apache.org
Subject: Chainsaw LogFilePatternReceiver

Hello Users,

I am using log4J and now I want to use chainsaw to see the logs. I
configured log4J using following configurations.

log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.logFile.File=D:/abc.log
log4j.appender.logFile.DatePattern='.'yyyy-MM-dd
log4j.appender.logFile.layout=org.apache.log4j.PatternLayout
log4j.appender.logFile.layout.ConversionPattern=%d{MM-dd-yy HH:mm:ss}
%-5p [%x] %c{2} - %m%n
log4j.rootLogger=DEBUG, logFile

I want to know what should be the value for my LogFilePatternReceiver
for this log4J configuration. Specifically, what should be the value
where I have ************

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration >
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="true">
  <plugin name="LogFileReceiver"
class="org.apache.log4j.varia.LogFilePatternReceiver">
     <param name="fileURL"
value="file:///D:/SSJ/Logs/Seamless/seamless.log"/>
     <param name="timestampFormat" value="************"/>
     <param name="logFormat" value="************"/>
     <param name="name" value="sampleLogFilePatternReceiver"/>
     <param name="tailing" value="true"/>
    <param name="filter" value="************"/>
   </plugin>
   </log4j:configuration>
Thanks.
Kumar



      

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message