#31 Console STDERR appender in config file

open
nobody
None
5
2013-06-21
2013-06-06
Craig McQueen
No

Add the ability to specify an appender for output to STDERR in the config file.

At the moment there is only ConsoleAppender which outputs to STDOUT.

Perhaps a separate ErrorConsoleAppender could be added. Or perhaps a stream option could be added to ConsoleAppender. Or separate OstreamAppender with a stream option.

Discussion

  • The feature looks to be reasonable since it is useful and it follows log4j design.
    Current ConsoleAppender (which is of class log4cpp::OstreamAppender actually) redirects all its input into std::cout.
    It could be an option of ConsoleAppender which will redirect input into std::cerr.

    The topic to discuss is what values of that option should look like.
    C++ and C runtime library have no notion of System.err neither System.out.
    So the value of log4j.appender.appendername.target should probably be either STDERR or STDOUT.