Open skjolber opened 2 years ago
The logback-structured-config
module is a packaging of logstash-logback-encoder that writes to a file amongst other things, but it's possible to set up the encoder to write to CONSOLE in exactly the same way.
The documentation at https://tersesystems.github.io/terse-logback/1.0.0/guide/structured-config/ explains how to set up appenders and multiple encoders
And there's also https://github.com/tersesystems/terse-logback-showcase which shows some more options.
Is your feature request related to a problem? Please describe. We have been using structured logging directly to console for quite some time for our kubernetes JVMs. However it seems the current implementation of this library only supports JSON to file.
Describe the solution you'd like Support JSON output to console as well, for deployed (production) workloads. For local development, we like plain old one-line logging. Unit testing against resulting JSON output should still work in development.
Describe alternatives you've considered None
Additional context Our agent requires "one linebreak per log statement".