On Feb 27, 2006, at 9:36 AM, Francois MAROT wrote:
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.
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 ?
Looks like two things, one you are logging to "log4j.fraLogger" in
the code, but are configuring "fraLogger" in the properties file.
The "log4j." in the properties file just identifies the property as
pertaining to log4j configuration and is discarded. If you change
the argument in the getLogger call from "log4j.fraLogger" to
"fraLogger", your log requests should go into both ACSA-log4cxx.log
and TMP.log.
As mentioned in the previous message, if you do not want messages to
go to both files, you need to specify the "additivity" for the
fraLogger to false so that it does not pass on the requests to
appenders attached to the root. You would do that by adding the
following line to your configuration file.
log4j.additivity.fraLogger=false