JSON Logging From Quarkus
In order to work best with log aggregators like EFK Stack or Splunk, you want to output your logs in JSON format for easier indexing.
- Add the JSON Logging module to the Maven
pom.xml
filexml<dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-logging-json</artifactId> </dependency>
- Add configuration settings to the
application.properties
file.quarkus.log.console.json=false %prod.quarkus.log.console.json=true
- We can further customize the JSON logging output by configuring the underlying logging provider as documented HERE