Open navaneeth-spotnana opened 4 years ago
In other words, can I use the net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder
with this appender?
Hi, maybe a bit late answer... but you can use net.logstash.logback.layout.LoggingEventCompositeJsonLayout
to achieve the same effect:
<appender name="cloudwatch" class="io.github.dibog.AwsLogAppender">
<!-- groupName, streamName, awsConfig -->
<layout class="net.logstash.logback.layout.LoggingEventCompositeJsonLayout">
<providers>
<pattern>
<pattern>
{
"message": "%msg",
"level": "%level",
"thread": "%thread",
"logger": "%logger"
}
</pattern>
</pattern>
</providers>
</layout>
</appender>
Hi
My message is in itself a json string. I want the logged message to be treated as a valid json data if it's a valid json string, otherwise keep it as a normal string, like documented here.
It's a bit over my head, can you help me with a config?