logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Deboy <scott.de...@gmail.com>
Subject Re: reading python logging from chainsaw
Date Mon, 31 Aug 2009 05:57:25 GMT
I was able to load your events into the latest version of Chainsaw without
issues.

I assume you're using the version available from the log4j web site (Web
Start or bundle download).  There have been significant changes made to
LogFilePatternReceiver since that version was released - those changes
probably addressed your issues.  Hopefully we'll make another release soon
that will include these fixes.

You could build Chainsaw yourself from source, but it's a pretty complicated
and fragile process (since it requires you to build log4j and friends via
maven (and resolve external dependencies).  Hopefully that process will
improve as well.

Scott

On Fri, Aug 28, 2009 at 10:43 AM, Hari Krishna Dara <haridara@gmail.com>wrote:

> Here are the lines copy pasted:
>
> 2009-08-22 20:05:24,526 root         MainThread INFO     STARTING ...
> 2009-08-22 20:05:24,526 database     MainThread DEBUG    Connecting ...
> 2009-08-22 20:05:24,542 database     MainThread DEBUG    F2SQLServerCursor
> ...
> 2009-08-22 20:05:24,542 database     MainThread DEBUG    SQL: ...
>                  SELECT ...
>                  FROM ...
>
> 2009-08-22 20:05:24,542 root         MainThread INFO     Starting thread
> ...
> 2009-08-22 20:05:24,542 root         MainThread INFO     Waiting for
> thread: ...
> 2009-08-22 20:05:24,542 worker       ReportingSummarization.main INFO
> Thr...
> 2009-08-22 20:05:24,542 reportingsummarization
> ReportingSummarization.main INFO     Starting run ...
> 2009-08-22 20:05:24,542 database     ReportingSummarization.main DEBUG
>  Con...
>
> -- Hari
>
> On Fri, Aug 28, 2009 at 2:51 AM,
> <log4j-user-digest-help@logging.apache.org> wrote:
> > From: Scott Deboy <scott.deboy@gmail.com>
> > To: Log4J Users List <log4j-user@logging.apache.org>
> > Date: Thu, 27 Aug 2009 17:49:55 -0700
> > Subject: Re: reading python logging from chainsaw
> > Sorry, file attachments are stripped from the mailing list...just provide
> > example entries in email and I'll look into it.
> >
> > Scott
> >
> > On Thu, Aug 27, 2009 at 4:36 PM, Hari Krishna Dara <haridara@gmail.com
> >wrote:
> >
> > > Thanks Scott. The attached file has sample log that has only one line
> > > parsed correctly (log ID: 8), the rest have it wrong. Save this file
> > > and use the below options for LogFilePatternReceiver:
> > >
> > > fileURL: file:///c:/tmp/refresh_reporting.log
> > > logFormat: TIMESTAMP LOGGER THREAD LEVEL MESSAGE
> > > name: refresh_reporting
> > >
> > > If you save to a different directory than c:\tmp, change it
> > > accordingly. If you don't use windows, you may have to change the
> > > number of slashes (not sure). Name can be anything.
> > >
> > > I don't currently have the log that I generated with fixed width of 40
> > > characters for thread name, but if you need that I can try to generate
> > > it again (or change the attached log file to have a fixed width for
> > > thread name). I expected that to parse better, but even the log ID: 8
> > > didn't parse in that context.
> > >
> > > -- Hari
> > >
> > > On Sun, Aug 23, 2009 at 6:49 PM,
> > > <log4j-user-digest-help@logging.apache.org> wrote:
> > > >
> > > > ---------- Forwarded message ----------
> > > > From: Scott Deboy <scott.deboy@gmail.com>
> > > > To: Log4J Users List <log4j-user@logging.apache.org>
> > > > Date: Fri, 21 Aug 2009 15:34:15 -0700
> > > > Subject: Re: reading python logging from chainsaw
> > > > If you can post a few lines of the log containing the example text
> that
> > > > parses correctly and incorrectly, we can probably help you figure out
> > > what
> > > > needs to be changed.
> > > >
> > > > Scott
> > > >
> > > > On Fri, Aug 21, 2009 at 3:13 PM, Hari Krishna Dara <
> haridara@gmail.com
> > > >wrote:
> > > >
> > > > > I have been occasionally using chainsaw to analyze log files
> generated
> > > from
> > > > > python. I use the LogFilePatternReceiver with a file:// url and it
> > > worked
> > > > > fairly well for the python log format of "%(asctime)s %(name)-12s
> > > > > %(levelname)-8s %(message)s" and chainsaw pattern of "TIMESTAMP
> LOGGER
> > > > > LEVEL
> > > > > MESSAGE".
> > > > >
> > > > > I am now trying to get it working with the threadname in the
> pattern,
> > > but
> > > > > chainsaw doesn't seem to match the pattern properly. I changed the
> > > python
> > > > > format to "%(asctime)s %(name)-12s %(threadName)s %(levelname)-8s
> > > > > %(message)s" and chainsaw pattern to "TIMESTAMP LOGGER THREAD LEVEL
> > > > > MESSAGE", however, chainsaw doesn't recognize the threadname in
> most of
> > > the
> > > > > cases. In fact, it fails to recognize the level in most cases. It
> > > appears
> > > > > as
> > > > > though, when the level is INFO, I can see the threadname and level
> > > > > recognized, otherwise, THREAD and LEVEL are clubbed into MSG.
> > > > >
> > > > > I then tried assigning fixed width to threadname
> (%(threadName)-40s),
> > > in
> > > > > case that is what is causing the confusion, but this actually made
> it
> > > even
> > > > > worse. Is there a way to fine tune how LogFilePatternReceiver
> > > recognizes
> > > > > different fields in the log? May be a way to specify the field
> widths?
> > > I am
> > > > > using v2. I would appreciate any help.
> > > > >
> > > >
> > >
> > >
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message