logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hari Krishna Dara <harid...@gmail.com>
Subject Re: log4j-user Digest 24 Aug 2009 01:49:01 -0000 Issue 1647
Date Thu, 27 Aug 2009 23:37:32 GMT
Oops... sorry, forgot to change the subject while replying to the
digest. Please ignore this message.

On Thu, Aug 27, 2009 at 4:34 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
View raw message