~jan0sch/smederee

~jan0sch/smederee/modules/hub/src/universal/conf/logback.xml
 ..
0 <?xml version="1.0" encoding="UTF-8"?>
1 <configuration debug="false">
2 <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
3 <encoder>
4 <pattern>%date %highlight(%-5level) %cyan(%logger{0}) - %msg%n</pattern>
5 </encoder>
6 </appender>
7
8 <appender name="file-sift" class="ch.qos.logback.classic.sift.SiftingAppender">
9 <!-- in the absence of the class attribute, it is assumed that the
10 desired discriminator type is
11 ch.qos.logback.classic.sift.MDCBasedDiscriminator -->
12 <discriminator>
13 <key>runId</key>
14 <defaultValue>smederee-hub</defaultValue>
15 </discriminator>
16 <sift>
17 <appender name="file-${runId}" class="ch.qos.logback.core.rolling.RollingFileAppender">
18 <!--See also http://logback.qos.ch/manual/appenders.html#RollingFileAppender-->
19 <file>logs/${runId}.log</file>
20 <encoder>
21 <pattern>%date %-5level %logger{0} - %msg%n</pattern>
22 </encoder>
23 <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
24 <maxIndex>10</maxIndex>
25 <FileNamePattern>logs/${runId}.log.%i</FileNamePattern>
26 </rollingPolicy>
27 <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
28 <MaxFileSize>10MB</MaxFileSize>
29 </triggeringPolicy>
30 </appender>
31 </sift>
32 </appender>
33
34 <appender name="async-console" class="ch.qos.logback.classic.AsyncAppender">
35 <appender-ref ref="console"/>
36 <queueSize>5000</queueSize>
37 <discardingThreshold>0</discardingThreshold>
38 </appender>
39
40 <appender name="async-file" class="ch.qos.logback.classic.AsyncAppender">
41 <!--
42 We are wrapping the sifting file appender into the
43 async appender for performance reasons.
44 -->
45 <appender-ref ref="file-sift"/>
46 <queueSize>5000</queueSize>
47 <discardingThreshold>0</discardingThreshold>
48 </appender>
49
50 <logger name="de.smederee.hub" level="${smederee.hub.loglevel:-WARN}" additivity="false">
51 <appender-ref ref="async-console"/>
52 <appender-ref ref="async-file"/>
53 </logger>
54
55 <logger name="de.smederee.ssh" level="${smederee.ssh.loglevel:-INFO}" additivity="false">
56 <appender-ref ref="async-console"/>
57 <appender-ref ref="async-file"/>
58 </logger>
59
60 <root level="INFO">
61 <appender-ref ref="async-console"/>
62 <appender-ref ref="async-file"/>
63 </root>
64 </configuration>