logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francois MAROT <francois.ma...@laposte.net>
Subject Newbie question
Date Mon, 27 Feb 2006 15:36:52 GMT
Hi all,

i'm about to implement a logging system and have been experimenting with 
log4cxx recently. But i have some problems...
The fact is I don't try to do anything very hard, only configuring 
properly my output to a desired file.

here's my c++ code:

    LoggerPtr fraLogger = Logger::getLogger("log4j.fraLogger");
    LOG4CXX_INFO(fraLogger, "1 - info");
    LOG4CXX_WARN(fraLogger, "2 - warn");
    LOG4CXX_ERROR(fraLogger, "3 - error");
    LOG4CXX_FATAL(fraLogger, "4 - fatal");

and here is my file ACSA-log4cxx-DBG.properties :

    log4j.rootLogger = DEBUG, ACSALogger
    log4j.appender.ACSALogger = org.apache.log4j.RollingFileAppender
    log4j.appender.ACSALogger.layout = org.apache.log4j.PatternLayout
    log4j.appender.ACSALogger.layout.ConversionPattern=%-4r [%t] %-5p %c
    %x - %m%n
    log4j.appender.ACSALogger.File = ACSA-log4cxx.log

    log4j.fraLogger = ERROR, ACSALogger2
    log4j.appender.ACSALogger2 = org.apache.log4j.RollingFileAppender
    log4j.appender.ACSALogger2.layout = org.apache.log4j.SimpleLayout
    log4j.appender.ACSALogger2.File = TMP.log

I thought, as i stated in code i wanted to use logger "log4j.fraLogger", 
that my logging info would be written
in the file named "TMP.log". But it is written in file 
"ACSA-log4cxx.log". I thought only rootlogger would
write to this file... Am I missing something ?



View raw message