Improve server logging and manually load logback

This commit is contained in:
Chord 2016-07-19 03:02:44 -04:00
parent 8b14015582
commit 98b87e1e13
3 changed files with 58 additions and 4 deletions

27
logback.xml Normal file
View file

@ -0,0 +1,27 @@
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default
http://logback.qos.ch/manual/layouts.html#ClassicPatternLayout
-->
<encoder>
<pattern>[%highlight(%5level)] %logger{35} - %msg%n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>pslogin-debug.log</file>
<encoder>
<!--<pattern>%date{ISO8601} %highlight(%-5level) [%thread MDC{%X}] %logger{35} - %msg%n</pattern>-->
<pattern>%date{ISO8601} %-5level %X %logger{35} - %msg%n</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="STDOUT" />
</root>
<logger name="debug-logger" level="DEBUG">
<appender-ref ref="FILE" />
</logger>
</configuration>