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 <[email protected]>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, > <[email protected]> wrote: > > > > ---------- Forwarded message ---------- > > From: Scott Deboy <[email protected]> > > To: Log4J Users List <[email protected]> > > 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 <[email protected] > >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: [email protected] > For additional commands, e-mail: [email protected] >
