Skip to content

Instantly share code, notes, and snippets.

@palmerabollo
Created October 13, 2017 08:52
Show Gist options
  • Save palmerabollo/f1ba15757fecedacf5e235949c698286 to your computer and use it in GitHub Desktop.
Save palmerabollo/f1ba15757fecedacf5e235949c698286 to your computer and use it in GitHub Desktop.
<!-- https://www.playframework.com/documentation/latest/SettingsLogger -->
<configuration>
<conversionRule conversionWord="coloredLevel" converterClass="play.api.libs.logback.ColoredLevel" />
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder">
<providers>
<pattern>
<pattern>
{
"time": "%date{yyyy-MM-dd'T'HH:mm:ss.SSS'Z'}",
"lvl": "%level",
"logger": "%logger{15}",
"thread": "%thread",
"msg": "%message"
}
</pattern>
</pattern>
<logstashMarkers/>
<arguments/>
<stackTrace/>
</providers>
</encoder>
</appender>
<appender name="ASYNCSTDOUT" class="ch.qos.logback.classic.AsyncAppender">
<appender-ref ref="STDOUT" />
</appender>
<logger name="play" level="INFO" />
<logger name="application" level="DEBUG" />
<logger name="com.telefonica.baikal" level="DEBUG" />
<logger name="com.zaxxer.hikari" level="DEBUG" />
<root level="WARN">
<appender-ref ref="ASYNCSTDOUT" />
</root>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment