Skip to content

Commit

Permalink
Added default log4j config as example.
Browse files Browse the repository at this point in the history
  • Loading branch information
ppanopticon committed Feb 9, 2021
1 parent 648f850 commit 982a75a
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration strict="true" name="Default">
<Appenders>
<Appender type="Console" name="STDOUT">
<Layout type="PatternLayout" pattern="%d{yyyy-MM-dd HH:mm:ss} [%t] %-5p %c{1}:%L - %m%n"/>
</Appender>
</Appenders>
<Loggers>
<!-- Logger for WebService -->
<Logger name="ch.pontius.swissqr.api.requests" level="debug"/>
<Appenders>
<Appender type="Console" name="STDOUT">
<Layout type="PatternLayout" pattern="%d{yyyy-MM-dd HH:mm:ss} [%t] %-5p %c{1}:%L - %m%n"/>
</Appender>
<Appender type="RollingFile" name="WEBLOG" fileName="./logs/request.log" filePattern="./logs/request.%i.log.gz">
<Layout type="PatternLayout" pattern="%d{yyyy-MM-dd HH:mm:ss} [%t] %-5p %c{1}:%L - %m%n"/>
<Policies>
<SizeBasedTriggeringPolicy size="25 MB"/>
</Policies>
<DefaultRolloverStrategy max="5" />
</Appender>
</Appenders>
<Loggers>
<!-- Logger for WebService -->
<Logger name="ch.pontius.swissqr.api.requests" level="debug" additivity="false"/>

<!-- Root logger -->
<Root level="info">
<AppenderRef ref="STDOUT"/>
</Root>
</Loggers>
</Configuration>
<!-- Root logger -->
<Root level="info">
<AppenderRef ref="STDOUT"/>
</Root>
</Loggers>
</Configuration>

0 comments on commit 982a75a

Please sign in to comment.