Closed aelamrani closed 3 years ago
We should add in the node the libraries useful to log in JSON:
The goal is to be able to log in JSON by changing the logback config with:
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder"> <layout class="ch.qos.logback.contrib.json.classic.JsonLayout"> <timestampFormat>yyyy-MM-dd'T'HH:mm:ss.SSSX</timestampFormat> <timestampFormatTimezoneId>Etc/UTC</timestampFormatTimezoneId> <jsonFormatter class="ch.qos.logback.contrib.jackson.JacksonJsonFormatter"> <prettyPrint>false</prettyPrint> </jsonFormatter> <appendLineSeparator>true</appendLineSeparator> </layout> </encoder> </appender>
Flat result:
{"timestamp":"2020-05-26T11:17:51.678Z","level":"INFO","thread":"graviteeio-node","logger":"io.gravitee.node.container.spring.env.PropertiesConfiguration","message":"Loading Gravitee configuration.","context":"default"} {"timestamp":"2020-05-26T11:17:51.686Z","level":"INFO","thread":"graviteeio-node","logger":"io.gravitee.node.container.spring.env.PropertiesConfiguration","message":"\tGravitee configuration loaded from /Users/azize/tools/graviteeio-full/graviteeio-gateway-3.0.0/config/gravitee.yml","context":"default"} {"timestamp":"2020-05-26T11:17:51.745Z","level":"INFO","thread":"graviteeio-node","logger":"io.gravitee.node.container.spring.env.PropertiesConfiguration","message":"Loading Gravitee configuration. DONE","context":"default"}
Pretty print:
{ "timestamp" : "2020-05-26T11:20:57.098Z", "level" : "INFO", "thread" : "graviteeio-node", "logger" : "io.gravitee.node.container.spring.env.PropertiesConfiguration", "message" : "Loading Gravitee configuration.", "context" : "default" } { "timestamp" : "2020-05-26T11:20:57.105Z", "level" : "INFO", "thread" : "graviteeio-node", "logger" : "io.gravitee.node.container.spring.env.PropertiesConfiguration", "message" : "\tGravitee configuration loaded from /Users/azize/tools/graviteeio-full/graviteeio-gateway-3.0.0/config/gravitee.yml", "context" : "default" }
hi could be great to add this great feature in your documentation. or i have missed it ?
We should add in the node the libraries useful to log in JSON:
The goal is to be able to log in JSON by changing the logback config with:
Flat result:
Pretty print: