Skip to content

Instantly share code, notes, and snippets.

@shemnon
Created December 12, 2018 17:45
Show Gist options
  • Save shemnon/493f041526119aeaffe370924355fd08 to your computer and use it in GitHub Desktop.
Save shemnon/493f041526119aeaffe370924355fd08 to your computer and use it in GitHub Desktop.
Pantheon Log4J rolling debug to a file
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="warn" name="MyApp" packages="">
<Properties>
<Property name="root.log.level">DEBUG</Property>
</Properties>
<Appenders>
<RollingFile name="RollingFile" fileName="debug.log"
filePattern="debug-%i.log">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSSZZZ} | %t | %-5level | %c{1} | %msg%n"/>
<Policies>
<SizeBasedTriggeringPolicy size="50 MB"/>
</Policies>
<DefaultRolloverStrategy max="5"/>
</RollingFile>
<Console name="Console" target="SYSTEM_OUT">
<ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY"/>
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSSZZZ} | %t | %-5level | %c{1} | %msg%n"/>
</Console>
</Appenders>
<Loggers>
<Root level="${sys:root.log.level}">
<AppenderRef ref="Console"/>
<AppenderRef ref="RollingFile"/>
</Root>
</Loggers>
</Configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment