Scott, Thanks for the reply, but I'm still not quite getting it.
Currently, we are using something like this for Log4J. I've used it
unsuccessfully with Chainsaw. How does this covert into XML (like the
example that you provided) ? Thank you.
log4j.rootCategory=DEBUG, A2, Chainsaw
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-5p [%F %L] - %m%n
log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender
log4j.appender.A2.file=C:/logs/log4j.log
log4j.appender.A2.datePattern='.'yyyy-MM-dd
log4j.appender.A2.append=true
log4j.appender.A2.layout=org.apache.log4j.PatternLayout
log4j.appender.A2.layout.ConversionPattern=%-5p %d{ISO8601} [%F %L] -
%m%n
#log4j.appender.A2=org.apache.log4j.FileAppender
#log4j.appender.A2.file=C:/logs/log4j.log
#log4j.appender.A2.layout=org.apache.log4j.xml.XMLLayout
#log4j.appender.A2.append=false
#log4j.appender.Chainsaw=org.apache.log4j.net.SocketAppender
#log4j.appender.Chainsaw.remoteHost=localhost
#log4j.appender.Chainsaw.port=4445
#log4j.appender.Chainsaw.locationInfo=true
Hi Jerry,
Chainsaw needs a log4j config file (log4j.xml or log4j.properties) to
configure receivers, similar to how you configure appenders.
Here's a link to an example receiver configuration:
http://cvs.apache.org/viewcvs.cgi/l...w/log4j-receiver-sample.xml?rev=1.4&view=auto
Save this file to somewhere on your file system after modifying the
'plugin' (receiver) configurations that match the appenders you use (if
you use a socketappender, configure a socketreceiver to use the same
port).
Then, open Chainsaw (available via Web Start here):
http://logging.apache.org/log4j/docs/chainsaw.html
preferences
menu.
Specify the URL to the log4j receiver config file you created in the
'automatic configuration URL' field, hit OK and restart Chainsaw.
The same receiver configuration example is available from the 'Welcome'
tab - select the 'View example receiver configuration' button on the
Welcome tab's toolbar.
You can also create receivers dynamically from the receiver panel - be
sure to specify the 'name' field or you you won't be able to find
it
in
the receiver list later.
There is a tutorial available from the Welcome tab explaining the main
features of Chainsaw.
If you have more questions feel free to send an email to the log4j user
mailing list:
http://logging.apache.org/site/mailing-lists.html
Hope this helps,
Scott
log4j
for
file