Skip to content

Commit

Permalink
Merge pull request quarkusio#6277 from mejlholm/master
Browse files Browse the repository at this point in the history
Mention possibility to disable JSON for non prod
  • Loading branch information
gsmet authored Dec 20, 2019
2 parents c38ddde + e288f4e commit 7c71762
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions docs/src/main/asciidoc/logging.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,28 @@ application POM as the following snippet illustrates.
.Modifications to POM file to add the JSON logging extension
[source,xml]
----
<build>
<dependencies>
<!-- ... your other dependencies are here ... -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-logging-json</artifactId>
</dependency>
</dependencies>
</build>
----

The presence of this extension will, by default, replace the output format configuration from the console configuration.
This means that the format string and the color settings (if any) will be ignored. The other console configuration items
(including those controlling asynchronous logging and the log level) will continue to be applied.

For some, it will make sense to use logging that is humanly readable (unstructured) in dev mode and JSON logging (structured) in production mode. This can be achieved using different profiles, as shown in the following configuration.

.Disable JSON logging in application.properties for dev and test mode
[source, properties]
----
%dev.quarkus.log.console.json=false
%test.quarkus.log.console.json=false
----

===== Configuration

The JSON logging extension can be configured in various ways. The following properties are supported:
Expand Down

0 comments on commit 7c71762

Please sign in to comment.