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: pattern and chainsaw
Date Sun, 29 Feb 2004 20:39:36 GMT
I agree, log files stored in a non-XML format should be viewable in Chainsaw v2.

I contributed a Receiver which provides Log4J (and Chainsaw v2) the ability to process events
stored in a logfile written using an arbitrary format (PatternLayout).

In order to use this receiver, follow the instructions in the 'installation' section of the
Chainsaw v2 page and use the XML configuration provided below

Here's a link to the Chainsaw v2 page:

See the javadoc of the new Receiver for an explanation of the available keywords used by the
the 'logFormat' param:

Here is the example XML configuration, which can load events written to disk using this PatternLayout
format: %r [%t] %-5p %c %x - %m%n

<?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:/logs/A4.log"/>
      <level value="debug"/>

If anyone has questions, let me know


-----Original Message-----
From:	Jean Charles Jabouille [mailto:JEAN-CHARLES.JABOUILLE@BULL.NET]
Sent:	Fri 2/27/2004 1:16 AM
To:	Log4J Users List
Subject:	Re: pattern and chainsaw
i'm ok with you, but i don't want a XML file. I want a .log file. I want
to use the chainsaw v1. And when i open chainsaw and submit my log file,
it's found "0 events".
I think that's a pattern problem. So i'dlike to know the standard pattern
for Chainsaw v1.

Thanks for your reply

Scott Deboy wrote:

> Chainsaw can display log files which were formatted using XMLLayout.
> The version of Chainsaw in CVS - see
> http://logging.apache.org/log4j/docs/chainsaw.html - can also display
> jdk1.4 util.logging files if they were formatted using XMLFormatter.
> Replace the layout specified in your file appender with this:
>         <layout class="org.apache.log4j.xml.XMLLayout"/>
> Scott
> -----Original Message-----
> From: Jean Charles Jabouille [mailto:JEAN-CHARLES.JABOUILLE@BULL.NET]
> Sent: Thursday, February 26, 2004 4:21 AM
> To: log4j-user@logging.apache.org
> Subject: pattern and chainsaw
> Hi,
> i'd'like to know if there is a specific pattern for log in order to be
> used with Chainsaw.
> My layout is file.log
> Thanks for your reply
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message