You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

If you are developing Odysseus or using the downloaded product, you can custumize the logging behavior. To enable extended logging in the downloaded product do the following:

  1. Go to main directory of the installed Odysseus. If you are developing in Odysseus with Eclipse, you can go to the de.uniol.inf.is.odysseus.slf4j feature and open the log4j2.xml file and skip the next steps until step 5.
  2. Go to: plugins
  3. Go to: de.uniol.inf.is.odysseus.slf4j_[some version number]
  4. Open File: log4j2.xml
  5. Find line:
<Root level="warn">
  • Change the line to:
<Root level="debug">

Remark: See official Log4j2 documentation for further informtion.

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:

<?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.

.options

  • No labels