Skip to content

Instantly share code, notes, and snippets.

@phillro
Created May 10, 2015 19:56
Show Gist options
  • Save phillro/79054a245aa167cc52e3 to your computer and use it in GitHub Desktop.
Save phillro/79054a245aa167cc52e3 to your computer and use it in GitHub Desktop.
<configuration>
<conversionRule conversionWord="coloredLevel" converterClass="play.api.Logger$ColoredLevel" />
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>${application.home}/logs/application.log</file>
<encoder>
<pattern>%date - [%level] - from %logger in %thread %n%message%n%xException%n</pattern>
</encoder>
</appender>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%coloredLevel %logger{15} - %message%n%xException{5}</pattern>
</encoder>
</appender>
<appender name="LOGSTASH" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<remoteHost>dockerhost</remoteHost>
<port>5000</port>
<encoder class="net.logstash.logback.encoder.LogstashEncoder" />
</appender>
<logger name="DATALOGGER" level="INFO">
<appender-ref ref="LOGSTASH" />
</logger>
<logger name="play" level="INFO" />
<logger name="application" level="DEBUG" />
<root level="INFO">
<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