Hi Craig,
Receivers are new to log4j1.3, which isn't released yet (will be in
alpha soon), but we're using them with Chainsaw). We'll work on
improving the docs.
LogFilePatternReceiver expects a path to look like this:
c:/somepath/somefile.
We're working on adding the ability to process files accessible via
VFS, but that'll be a while before it's available. Right now
LogFilePatternReceiver expects a file path, so you'll probably need to
use NFS for now.
By the way, Chainsaw has built in support for ORO regular expressions
(define a regexp using the LIKE operator). You can also combine
expressions using parentheses and logical operators (&&, ||, !). Just
make sure to put spaces around all operators, operands and
parentheses.
If you have fields in your log file that don't match to log4j's
built-in fields, specify the field(s) in the logFormat as PROP(MYKEY)
for example, and the field will end up in as the 'MYKEY' column in
Chainsaw, which can then be used to filter expressions.
Note that you can specify a filter expression, which can be used to
pre-filter events from being processed by Chainsaw. Leave this param
out if you want to load the entire file.
If possible, specify a logger in the logFormat - it can be used in the
logger tree panel to quickly access events without having to build an
expression rule.
The receiver may not process events if a logger field isn't specified
(I can't recall).
Here's a sample log4j.xml file that can be used as a Chainsaw
configuration file that will process your file's events on Chainsaw's
startup (specify this xml file here: view menu, show application-wide
preferences, automatic configuration.
log4j.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="timestampFormat" value="yyyy-MM-d HH:mm:ss,SSS"/>
<param name="logFormat" value="RELATIVETIME [THREAD] LEVEL
LOGGER * - MESSAGE"/>
<param name="fileName" value="c:/test/A4.log"/>
<param name="filterExpression" value="LEVEL > WARN"/>
<param name="tailing" value="true"/>
</plugin>
<root>
<level value="debug"/>
</root>
</log4j:configuration>
I hope this info helps. If you have further questions, let me know.
Scott
(e-mail address removed)