...
There is also the log4j2.test.xml
file where you can find examples to define the logger for each feature individually.
Example for an additional file appender
If you want to add an file appender next to the console appender, you need to add an appender and an an appender reference to the log4j2.xml file as follows:
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
</Console>
<RollingFile name="RollingFile" fileName="logs/Odysseus.log" filePattern="logs/Odysseus-%d{MM-dd-yyyy}.log"
ignoreExceptions="false">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
<TimeBasedTriggeringPolicy />
</RollingFile>
</Appenders>
<Loggers>
<Root level="info">
<AppenderRef ref="Console"/>
<AppenderRef ref="RollingFile"/>
</Root>
<!-- <Logger name="de.uniol.inf.is.odysseus.core" level="debug" additivity="false">
<AppenderRef ref="Console"/>
</Logger> -->
</Loggers>
</Configuration> |
Further Error Messages
Add the following file to you working directory of Odysseus to see further error messages.
...