eclipse, junit, log4j, & finding log4j.xml

Discussion in 'Java' started by Alexandra Stehman, Jan 19, 2004.

  1. 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
    Alexandra Stehman, Jan 19, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jan
    Replies:
    0
    Views:
    3,685
  2. bugbear
    Replies:
    4
    Views:
    1,818
    bugbear
    Jan 28, 2004
  3. Paul Carey

    Log4j and JUnit conflict

    Paul Carey, May 21, 2004, in forum: Java
    Replies:
    0
    Views:
    1,189
    Paul Carey
    May 21, 2004
  4. BlueDolphin

    log4j and console in ANT/JUnit task

    BlueDolphin, Oct 21, 2004, in forum: Java
    Replies:
    6
    Views:
    10,154
    BlueDolphin
    Oct 23, 2004
  5. nospawn
    Replies:
    2
    Views:
    1,137
    Giovanni Azua
    Feb 3, 2006
Loading...

Share This Page