Skip to content

Commit

Permalink
feat: also write logs to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
fengelniederhammer committed Oct 31, 2023
1 parent 5850ade commit a31522c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lapis2/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
<property name="LOG_FILE" value="LAPIS"/>
<property name="STATISTICS_LOG_FILE" value="statistics"/>
<property name="LOG_DIR" value="log"/>
<property name="PATTERN" value="%date %level [%thread] %class: %message%n"/>

<appender name="RollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_DIR}/${LOG_FILE}.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<Pattern>%date %level [%thread] %class: %message%n</Pattern>
<Pattern>${PATTERN}</Pattern>
</encoder>

<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
Expand All @@ -30,6 +31,12 @@
</rollingPolicy>
</appender>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>${PATTERN}</Pattern>
</layout>
</appender>

<root level="info">
<appender-ref ref="RollingFile"/>
</root>
Expand All @@ -38,6 +45,10 @@
<appender-ref ref="RollingFile"/>
</logger>

<root level="info">
<appender-ref ref="STDOUT"/>
</root>

<logger name="StatisticsLogger" level="info" additivity="false">
<appender-ref ref="StatisticsRollingFile"/>
</logger>
Expand Down

0 comments on commit a31522c

Please sign in to comment.