Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Greetings,
Is it possible to configure Talend Studio project preferences to output log4j2 into the JSON format?
I tried adding the jackson dependencies, as well as log4j2 in the project POM, edited the log4j template but I keep having the error:
Exception in thread "main" java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/ser/FilterProvider
Any clue about how to solve it?
it's 2023, June, did you find solution to output log in json format?
The alternative solution is using PatternLayout.
This is my log4j template
--- Start Code ---
<?xml version="1.0" encoding="UTF-8"?>
<Configuration >
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout >
<pattern>
{ 'timestamp':"%d{ISO8601}", 'level':"%level", 'category':"%c", 'message':"%enc{%m}{JSON}" }%n
</pattern>
</PatternLayout>
</Console>
</Appenders>
<Loggers>
<Root level="INFO">
<AppenderRef ref="Console" />
</Root>
</Loggers>
</Configuration>
--- End Code ---
For more detail, you can visit this link https://hexalink.xyz/talend/2023/06/21/Talend-How-to-export-log-in-JSON-Format.html