Hi,

I'm trying to use JSON layout for a logging format. When I use the default
JSON Layout, I see that there are some fields which are unnecessary to me
(for example, loggerFqcn, endOfBatch, etc).

Then I decided to implement a custom JSON layout. But I see that
JacksonFactory is not visible outside the package. Now I get only necessary
fields from LogEvent and generate JSON format using JSON generator. Every
configuration is done by code. But ultimately I want to configure fields in
log4j2.xml file. Any suggestions?

Also I would like to write logs into a log file. But my custom json layout
doesn't write into a file. Do I have to write a file appender for that?

Many thanks,

Reply via email to