logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject RE: API to read a log file to a Collection of LogEvent?
Date Mon, 05 Jan 2015 12:26:39 GMT
You can use a different layout and log to an additional appender which can easily be read by
log4j like Serialized.

Gary 

<div>-------- Original message --------</div><div>From: Behrooz Nobakht
<nobeh5@gmail.com> </div><div>Date:01/05/2015  06:01  (GMT-05:00) </div><div>To:
log4j-dev@logging.apache.org </div><div>Cc:  </div><div>Subject: API
to read a log file to a Collection of LogEvent? </div><div>
</div>Hi,

For example, I have an audit log file with certain structure (pattern layout). 
I want to replay the log that can be turned into certain domain objects.
I am interested to read the log file knowing the pattern layout 
into a Collection or Stream of LogEvent using Apache Log4j 2?

I understand that LogEvent may be an overkill for such purpose and potentially
simple string processing per line would do the job. Just want to make sure 
we can take advantage of an existing API if any.

Thanks,
Behrooz

Mime
View raw message