A
Alexandra Stehman
I've tried creating a classpath variable for the project which points
to log4j.xml. I have included the folder containing log4j.xml in the
libraries for the project. For some reason, the log.debug() messages
don't show up in the Eclipse console - but there are no errors
reported, either.
The code in question is a JUnit test and a helper class being tested.
The helper object calls Logger.getLogger(className) to get a reference
to the root logger.
Here is the XML definition:
-------------------------------------<log4j.xml>------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="false
">
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<param name="Threshold" value="DEBUG"/>
<param name="Target" value="System.out"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}]
%m%n"/>
</layout>
</appender>
<root>
<appender-ref ref="CONSOLE"/>
</root>
</log4j:configuration>
-------------------------------------</log4j.xml>------------------------------
Thanks for your help!
Cheers,
Alexandra Stehman
to log4j.xml. I have included the folder containing log4j.xml in the
libraries for the project. For some reason, the log.debug() messages
don't show up in the Eclipse console - but there are no errors
reported, either.
The code in question is a JUnit test and a helper class being tested.
The helper object calls Logger.getLogger(className) to get a reference
to the root logger.
Here is the XML definition:
-------------------------------------<log4j.xml>------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="false
">
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<param name="Threshold" value="DEBUG"/>
<param name="Target" value="System.out"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}]
%m%n"/>
</layout>
</appender>
<root>
<appender-ref ref="CONSOLE"/>
</root>
</log4j:configuration>
-------------------------------------</log4j.xml>------------------------------
Thanks for your help!
Cheers,
Alexandra Stehman