Skip to content

Instantly share code, notes, and snippets.

@mehmetcemyucel
Last active April 4, 2021 09:30
Show Gist options
  • Save mehmetcemyucel/b02ec6977fd40c93d2cb0d38cb2de6ca to your computer and use it in GitHub Desktop.
Save mehmetcemyucel/b02ec6977fd40c93d2cb0d38cb2de6ca to your computer and use it in GitHub Desktop.
log4j2 configuration
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="INFO" monitorInterval="30">
<Properties>
<Property name="basePath">C:\\logs</Property>
</Properties>
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level %logger{36} - %msg%n" />
</Console>
<File name="File" fileName="${basePath}/slf4j-log4j2.log" append="false">
<PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level %logger{36} - %msg%n" />
</File>
</Appenders>
<Loggers>
<Root level="info">
<AppenderRef ref="Console" />
<AppenderRef ref="File" />
</Root>
</Loggers>
</Configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment