Configuration Log4j: ConsoleAppender to System.err?

Posted by Gerard on Stack Overflow See other posts from Stack Overflow or by Gerard
Published on 2010-04-01T08:37:40Z Indexed on 2010/04/01 8:53 UTC
Read the original article Hit count: 347

Filed under:
|

I saw that one of our tools uses a ConsoleAppender to System.err next to System.out in it's log4j configuration. Fragments of the configuration:

<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
        <!-- Log to STDOUT. -->
        <param name="Target" value="System.out"/>

....

<appender name="CONSOLE_ERR" class="org.apache.log4j.ConsoleAppender">
            <!-- Log to STDERR. -->
    <param name="Target" value="System.err"/>

In Eclipse this results in double messages to the console, so I believe that is of no use, right? On the Linux server I see only one message to the PuTTY console, so where would that System.err message go to?

© Stack Overflow or respective owner

Related posts about log4j

Related posts about console