| <?xml version="1.0" encoding="UTF-8"?> |
| <configuration packages="org.apache.logging.log4j.test" status="debug" name="LoggerTest"> |
| <properties> |
| <property name="filename">target/test.log</property> |
| </properties> |
| <ThresholdFilter level="trace"/> |
| |
| <appenders> |
| <List name="EventLogger"> |
| <PatternLayout pattern="%C{1.} %m%n"/> |
| </List> |
| <Console name="STDOUT"> |
| <PatternLayout pattern="%C{1.} %m MDC%X%n"/> |
| </Console> |
| <File name="File" fileName="${filename}"> |
| <PatternLayout> |
| <pattern>%d %p %C{1.} [%t] %m%n</pattern> |
| </PatternLayout> |
| </File> |
| <List name="List"> |
| <PatternLayout pattern="%C{1.} %m MDC%X%n"/> |
| </List> |
| <SLF4J name="SLF4J"/> |
| </appenders> |
| |
| <loggers> |
| <logger name="EventLogger" level="info" additivity="false"> |
| <appender-ref ref="EventLogger"/> |
| </logger>> |
| |
| <logger name="org.apache.logging.log4j.test2" level="debug" additivity="false"> |
| <appender-ref ref="File"/> |
| </logger>> |
| |
| <root level="trace"> |
| <appender-ref ref="List"/> |
| </root> |
| </loggers> |
| |
| </configuration> |