You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To make parsing in centralized logging solutions like ELK or Splunk easier, applications built on Alpine should be able to emit their logs in JSON format, instead of raw text.
The logback configuration file to use can be overridden at runtime, via -DlogbackConfigurationFile=..., so users can already adjust the logging behavior to their choosing. However, logback does not have built-in JSON support, so an additional extension is required.
The text was updated successfully, but these errors were encountered:
nscuro
added a commit
to nscuro/Alpine
that referenced
this issue
Jul 10, 2023
This makes `logstash-logback-encoder` (and its required dependencies) available in the executable WAR's classpath, which enables usage of `LogstashEncoder` in the logback configuration file.
A minimal sample `logback.xml` using the encoder looks like this:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true">
<appender name="JSON_STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="net.logstash.logback.encoder.LogstashEncoder" />
</appender>
<root level="INFO">
<appender-ref ref="JSON_STDOUT" />
</root>
</configuration>
```
Closesstevespringett#502
Signed-off-by: nscuro <nscuro@protonmail.com>
To make parsing in centralized logging solutions like ELK or Splunk easier, applications built on Alpine should be able to emit their logs in JSON format, instead of raw text.
The logback configuration file to use can be overridden at runtime, via
-DlogbackConfigurationFile=...
, so users can already adjust the logging behavior to their choosing. However, logback does not have built-in JSON support, so an additional extension is required.The text was updated successfully, but these errors were encountered: