Created
August 28, 2019 10:41
-
-
Save ealogar/dc17b90f7c6613318a2a9db0af87ce76 to your computer and use it in GitHub Desktop.
ejemplo de logback
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 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"> | |
<discardingThreshold>0</discardingThreshold> | |
<appender-ref ref="STDOUT" /> | |
</appender> | |
<logger name="play" level="INFO" /> | |
<logger name="application" level="INFO" /> | |
<logger name="com.telefonica.baikal" level="INFO" /> | |
<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