The receiver panel does need work.  We're focusing on usability now, so hopefully this 
will be resolved soon.

Here's detailed instructions on how to configure Chainsaw with a 
LogFilePatternReceiver (not using the receiver panel):

-------------------------

Modify the xml below as needed (change params, add other 'plugin' nodes for
each file you want to view/tail in Chainsaw) and save as chainsaw.xml (or something 
more descriptive describing the files you're viewing).

Here's a link to the LogFilePatternReceiver javadoc, describing the
receiver and the params (including 'logFormat' keywords):
http://cvs.apache.org/viewcvs.cgi/logging-log4j/src/java/org/apache/log4j/varia/LogFilePatternReceiver.java?rev=1.19&view=auto

Inside Chainsaw, select:
view-show application wide preferences
- enter the URL of this chainsaw.xml in the 'automatic configuration
URL' field
- restart chainsaw

chainsaw.xml:
----------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<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:///c:/downloads/log4j/sample.log" />
<param name="timestampFormat" value="yyyyMMddHHmmssSSS"/>
<param name="logFormat" value="TIMESTAMP LEVEL(FILE:LINE)-LOGGER-MESSAGE"/>
<param name="name" value="logfileReceiver" />
<param name="tailing" value="true" />
</plugin>


   <root>
      <level value="debug"/>
   </root>
</log4j:configuration>


-----Original Message-----
From:   Rob Byrom [mailto:[EMAIL PROTECTED]
Sent:   Thu 10/28/2004 1:34 AM
To:     Log4J Users List
Cc:     
Subject:        RE: Stable version of Chainsaw?
thanks for helping me here!

On Tue, 2004-10-26 at 17:14, Scott Deboy wrote:
> Hi Rob,
> 
> Have you configured a socketappender and a fileappender (where fileappender's 
> patternlayout includes patterns for displaying the line/method or file name?
> 

I haven't tried this yet. I gave up because adding a new receiver seems
rather tricky. Normally, I ignore the startup menu 'configure a
receiver' and then just try to use the pane on the right hand side.
Clicking on the 'satelite' gif, I can select an appender which displays
a property list + javadoc for the receiver. The property list is quite
hard to figure out. For example, for the file appender, you have to type
in the url of where the file is which isn't that nice for the user ie
file:////tmp/somefile.log etc - a file browser would be nice :)

After filling in the various properties the receiver doesn't appear to
exist and there's no warning/error message to tell you where you've gone
wrong. Instead I have to resort to the debug output on the console. I'm
probably doing something stupid here...

Anwyay, I guess I shouldn't complain about about alpha releases :)

Rob



---------------------------------------------------------------------
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]

Reply via email to