logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gamby <gamby1...@libero.it>
Subject Extract log info from each output log line on the console
Date Mon, 01 Jun 2009 11:00:56 GMT

Hi all,

I'm developing a tool to do some auto statistics from the generated log of
an app...

I would like to be able to parse each log line generated obviously with lo4j
and extract all the info (timestamp, thread name, message and the others) in
a way that I could process separately those info.
Obviuosly I assume to know the pattern used to produce a log, knowing that
pattern, I would like to extract all the info.

For example if I know that a log file was produced using this pattern --> %d
%-5p [%t] - %m%n
Then I would like to extract from the generated log line, the timestamp, the
priority, the thread and the message, but without parsing the raw text using
string indexes for example....

And so the flow should be:
- An application produces some log
- My component read each log line generated and extract all the info, based
on log4j pattern used to produce that log

Any hints?
Thanks in advance
Gamby
-- 
View this message in context: http://www.nabble.com/Extract-log-info-from-each-output-log-line-on-the-console-tp23813238p23813238.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
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