You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Thomas Svensen <Th...@fast.no> on 2006/02/01 16:45:39 UTC
Trouble specifing logFormat in LogFileReceiver
Hi,
I am trying to use Chainsaw to read our log files, which are in fact
generated by a C++ application, but conforms quite well with normal
log4j formats. Here is a sample line from our log:
[2006-02-01 15:33:57] INFO :
no.fast.connector.framework.ConnectorManager@oslesp02.ad.fast.no:
articles: Finished running
I am trying to parse this data using a LogFileReceiver, and it is
working quite well! But I just can't get it to work 100%, because I
struggle with the logFormat. It seems impossible to get the "logger",
"message" and "NDC" right at the same time. Given the above log line, I
would hope to get these entries:
logger: no.fast.connector.framework.ConnectorManager (or with the
@osl...)
message: Finished running
ndc: articles (optionally, this could be part of the "message")
Anyway, I loose the "logger", or I loose the message :-(
I've tried all of these logformats (and more):
[TIMESTAMP] LEVEL : LOGGER: MESSAGE
[TIMESTAMP] LEVEL : LOGGER: NDC: MESSAGE
[TIMESTAMP] LEVEL :LOGGER: NDC: MESSAGE
[TIMESTAMP] LEVEL LOGGER: NDC: MESSAGE
etc.
For some version, Chainsaw logs an "Invalid filter expression", but for
most, I just get the wrong data in the wrong fields.
Any help on how to get a working logFormat would be highly appreciated!
As a last resort, I'll consider building my own version. Any hints on
how to easily to that would also be nice :-)
Thanks in advance!
______________________
Thomas Svensen
Senior Solutions Engineer
Fast Search & Transfer
Chr. Fredriks plass 6, Oslo
Mobile +47 48 01 12 63
www.fastsearch.com
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org