Log4j users--
I noticed something odd when I started configuring and testing log4j and
thought I would run it across this mailing list to see what the response is...
I chose to use log4j because of it's fine-grained logging control and the
ability to turn logging on/off for various categories. I tried using the
following configuration for my application:
log4j.logger.ACCESS=ERROR, CONSOLE
log4j.additivity.ACCESS.MyFunction=false
log4j.logger.ACCESS.MyFunction.SubFunction1=INFO, LOGFILE1
log4j.logger.ACCESS.MyFunction.SubFunction2=DEBUG, LOGFILE2
This does not behave as I would expect it to, all the SubFunction1 and
SubFunction2 calls are still going to the CONSOLE in addition to their log
files.
After a little digging through the source code, I realized that there is no
logger created for "ACCESS.MyFunction", so the additivity property set above
never gets used. I can resolve this by putting in an additional config line:
log4j.logger.ACCESS.MyFunction=OFF
Although this is a somewhat reasonable workaround, it is not ideal (I plan on
having _many hundred_ levels where I would have to add these config
directives) . I have to wonder if the code is functioning as designed or if
this is an oversight? There is no comment on this in the online
documentation, and the original configuration should logically work.
Let me know what your thoughts are.
Thanks,
Jason
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]