Quarkus Logging JSON

Quarkus logging extension outputting the logging in json.

Installation

If you want to use this extension, you need to add the quarkus-logging-json extension first. In your pom.xml file, add:

<dependency>
    <groupId>io.quarkiverse.loggingjson</groupId>
    <artifactId>quarkus-logging-json</artifactId>
</dependency>

Extension Configuration Reference

Configuration property fixed at build time - All other configuration properties are overridable at runtime

Configuration property

Type

Default

Used to wrap arguments in an json object, with this fieldName on root json.

string

Enable output of structured logging arguments StructuredArgument, default is true.

boolean

true

Enable output of non structured logging arguments, default is false.

boolean

false

What prefix to use, when outputting non structured arguments. Default is arg, example key for first argument will be arg0.

string

arg

Used to change the json key for the field.

string

The date format to use. The special string "default" indicates that the default format should be used.

string

default

The zone to use when formatting the timestamp.

string

default

boolean

Used to change the json key for the field.

string

boolean

Used to change the json key for the field.

string

boolean

Used to change the json key for the field.

string

boolean

Used to change the json key for the field.

string

boolean

Used to change the json key for the field.

string

Enable or disable the field.

boolean

Used to change the json key for the field.

string

boolean

Used to change the json key for the field.

string

boolean

Used to change the json key for the field.

string

boolean

Used to change the json key for the field.

string

Enable or disable the field.

boolean

Will write the values at the top level of the JSON log object.

boolean

false

Used to change the json key for the field.

string

Enable or disable the field.

boolean

Used to change the json key for the field.

string

boolean

Used to change the json key for the field.

string

boolean

Used to change the json key for the field.

string

boolean

Used to change the json key for the field.

string

boolean

Used to change the json key for the field.

string

boolean

Determine whether to enable the JSON console formatting extension, which disables "normal" console formatting.

boolean

true

Enable "pretty printing" of the JSON record. Note that some JSON parsers will fail to read pretty printed output.

boolean

false

The special end-of-record delimiter to be used. By default, newline delimiter is used.

string

` `

Support changing logging format.

default, ecs

default

For adding fields to the json output directly from the config

Type

Default

string

required

Type of the field, default is STRING. Supported types: STRING, INT, LONG, FLOAT, DOUBLE.

string, int, long, float, double

string