Yeah - good idea.
Here's the code Chainsaw uses to grab a log4j XML config's
FileAppender definition, including the PatternLayout, and build what's
needed to process the log messages going in to the target file.
BTW this is also how the log4j2 Advertiser integrates with Chainsaw.
Maybe we could take some code from Chainsaw and implement a
LogEventParser for Log4j 2?
https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/main/java/org/apache/logging/log4j/core/parser/TextLogEventParser.java
On 2018-01-19 17:00, Scott Deboy wrote:
Here's info on how you
FWIW, Log4j 2's log4j-core has an API to parse the output of JsonLayout,
XmlLayout and YamlLayout:
https://github.com/apache/logging-log4j2/tree/master/log4j-core/src/main/java/org/apache/logging/log4j/core/parser
On 2018-01-19 16:32, Joseph Husby wrote:
Hello!
I’m working on a project
If you application is running somewhere and Mongo is running somewhere else I
would recommend using the Flume Appender to send the events to a Flume node
that is running where Mongo is. Then have Flume write the events to Mongo.
Ralph
> On Jan 19, 2018, at 8:32 AM, Joseph Husby
Hello!
I’m working on a project where we need to take log4j2 output and (offline)
load it into a Mongo database. We can't use a mongo appender because the
database is not available where the software is running. We could use the
log4j2's JsonLayout to have an easily parsable log format, but