# 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.

  1. Add the JSON Logging module to the Maven pom.xml file
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-logging-json</artifactId>
    </dependency>
    
  2. Add configuration settings to the application.properties file.
    quarkus.log.console.json=false
    %prod.quarkus.log.console.json=true
    
  3. We can further customize the JSON logging output by configuring the underlying logging provider as documented HERE (opens new window)
Last Updated: 12/18/2021, 5:53:27 PM