Created
October 7, 2013 12:56
-
-
Save watermint/6867537 to your computer and use it in GitHub Desktop.
Configure Play2.2/Scala logging format as LTSV (Labeled Tab-separated Values).
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
<configuration> | |
<conversionRule conversionWord="coloredLevel" converterClass="play.api.Logger$ColoredLevel" /> | |
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
<file>${application.home}/logs/application.log</file> | |
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |
<fileNamePattern>${application.home}/logs/application.%d{yyyy-MM-dd}.log</fileNamePattern> | |
<maxHistory>14</maxHistory> | |
</rollingPolicy> | |
<encoder> | |
<charset>UTF-8</charset> | |
<pattern>time:%date{ISO8601}	level:%level	logger:%logger	thread:%thread	msg:%replace(%replace(%message){'\n','\\n'}){'\t',' '}	exception:%replace(%replace(%xException{5}){'\n','\\n'}){'\t',' '}%n%nopex</pattern> | |
<immediateFlush>true</immediateFlush> | |
</encoder> | |
</appender> | |
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder> | |
<pattern>%coloredLevel %logger{15} - %message%n%xException{5}</pattern> | |
</encoder> | |
</appender> | |
<logger name="play" level="INFO" /> | |
<logger name="application" level="INFO" /> | |
<root level="ERROR"> | |
<appender-ref ref="STDOUT" /> | |
<appender-ref ref="FILE" /> | |
</root> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
	
meaning what?