overleaf/services/git-bridge/src/main/resources/logback.xml
John Lees-Miller 64b49904e4 Use logback so we can use two log streams
We want all logs on stdout, for debugging, and warnings and errors
on stderr, for remote monitoring. The SLF4J SimpleLogger can't seem
to do this, but logback does, and we can still use the same SLF4J
interface.
2016-06-03 11:47:25 +01:00

32 lines
1.3 KiB
XML

<configuration>
<!-- Log everything (subject to logger and root levels set below) to stdout. -->
<appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
<target>System.out</target>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>TRACE</level>
</filter>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%thread] %logger{0}: %msg%n</pattern>
</encoder>
</appender>
<!-- Log warnings and errors to stderr. We send them to a log aggregation service for monitoring. -->
<appender name="stderr" class="ch.qos.logback.core.ConsoleAppender">
<target>System.err</target>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>WARN</level>
</filter>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%thread] %logger{0}: %msg%n</pattern>
</encoder>
</appender>
<!-- Set log levels for the application (or parts of the application). -->
<logger name="uk.ac.ic.wlgitbridge" level="INFO" />
<!-- The root log level determines how much our dependencies put in the logs. -->
<root level="WARN">
<appender-ref ref="stdout" />
<appender-ref ref="stderr" />
</root>
</configuration>