Skip to content

Instantly share code, notes, and snippets.

@zachdekoning
Forked from maruohon/log4j2.xml
Created November 5, 2013 20:35
Show Gist options
  • Save zachdekoning/7325770 to your computer and use it in GitHub Desktop.
Save zachdekoning/7325770 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<Appenders>
<File name="legacy_server_log" fileName="server.log">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} [%level] %msg%n" />
</File>
<Console name="console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} [%level] %msg%n" />
</Console>
<RollingFile name="rolling_server_log" fileName="logs/server.log"
filePattern="logs/server_%d{yyyy-MM-dd}.log">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} [%level] %msg%n" />
<Policies>
<TimeBasedTriggeringPolicy />
</Policies>
</RollingFile>
</Appenders>
<Loggers>
<Root level="info">
<!-- <AppenderRef ref="rolling_server_log" /> -->
<AppenderRef ref="legacy_server_log" />
<AppenderRef ref="console" />
</Root>
</Loggers>
</Configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment