Hi, Scott,
Thanks a lot for your reply. But it still didn't work with me.
The modified xml file is as follows:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="true">
<appender name="A2" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.SimpleLayout"/>
</appender>
<plugin name="SocketReceiver"
class="org.apache.log4j.net.SocketReceiver">
<param name="Port" value="4445"/>
</plugin>
<plugin name="XMLSocketReceiver"
class="org.apache.log4j.net.XMLSocketReceiver">
<param name="decoder"
value="org.apache.log4j.xml.UtilLoggingXMLDecoder"/>
<param name="Port" value="2222"/>
</plugin>
<plugin name="UDPReceiver" class="org.apache.log4j.net.UDPReceiver">
<param name="Port" value="4446"/>
</plugin>
<plugin name="MulticastReceiver"
class="org.apache.log4j.net.MulticastReceiver">
<param name="Port" value="4449"/>
<param name="Address" value="224.1.1.1"/>
</plugin>
<plugin name="patternFile"
class="org.apache.log4j.varia.LogFilePatternReceiver">
<param name="timestampFormat" value="yyyy-MM-d HH:mm:ss,SSS"/>
<param name="logFormat" value="RELATIVETIME [THREAD] LEVEL LOGGER *
- MESSAGE"/>
<param name="fileName" value="C:\Program Files\Apache Software
Foundation\Tomcat 5.0\webapps\addFeaturedJobs2\WEB-INF\filelog.log"/>
<param name="tailing" value="true"/>
</plugin>
<root>
<level value="debug"/>
</root>
</log4j:configuration>
But either I loaded this xml file using menu File->Load Log4J File or I
specified the absolute path the the xml file in "Application Wide
Preference" and restarted chainsaw2, nothing showed up. I build chainsaw2
from the source code but it still didn't work. Any comments?
BTW: Could you show me some simple examples about how to configure the
property file to let my logger class send logs to chainsaw2?
Thanks again.
Bing
-----Original Message-----
From: Scott Deboy [mailto:[EMAIL PROTECTED]
Sent: Monday, July 12, 2004 3:11 PM
To: Log4J Users List
Subject: RE: Questions about chainsaw2
Can you use an xml configuration file for Chainsaw?
If so, on the 'Welcome' tab, there's a 'View example Receiver
configuration' which shows an example XML file which can be used with
Chainsaw and loads a number of receivers.
Save the contents of this config to an .xml file on your drive, and add
this to the config file (change the pattern to match the pattern in
your file):
<plugin name="patternFile"
class="org.apache.log4j.varia.LogFilePatternReceiver">
<param name="timestampFormat" value="yyyy-MM-d HH:mm:ss,SSS"/>
<param name="logFormat" value="TIMESTAMP LEVEL [LOGGER]
MESSAGE"/>
<param name="fileName" value="c:/server.log"/>
<param name="tailing" value="true"/>
</plugin>
Once you've created the config file, you can have it loaded
automatically:
View menu, show application preferences
Specify the path to the config file in the General-automatic
configuration field.
Hope this helps,
Scott
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, July 12, 2004 1:54 PM
To: [EMAIL PROTECTED]
Subject: Questions about chainsaw2
Hi,
I started using Log4J last week and was amazed by the tutorial of
chainsaw2. But I have difficulties while using chainsaw2. 1. Could
anybody please show me how to write a log4j.properties file to configure
the appender to send logs to the chainsaw2?
2. I use chainsaw2 to import and view a local log file. But I could not
set the tailing property to true which means chainsaw2 can't be aware of
the changing of the log file. Did I do something wrong?
Thanks in advance.
Bing
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]