Hi again > There's isEnabledFor(Level), which works. > As a matter of practice: warnings, errors, fatals are considered in our > system to be rare events, always worthy of attention, and events where > logging performance is not a consideration, they must be logged. Debug > statements are the opposite. They are expected to be numerous, if > enabled, and logging performance is very important. > Your system may have different guidelines, I just wanted to share ;)
You're welcome ;) In fact, I was thinking about making my own tiny-nano-micro logging library for the game engine I am planning. Mostly every log statement would be preceded by a is{Debug,Info,Warn...}Enabled like test and then I took a closer look at log4j. I use it for work projects so why not having a common tool for both work and games ? Moreover there is log4jME that might fit nicely... if it was up-to-date and with is{Warning+}Enabled() methods. So why not having those methods in the Logger class anyway (just a few lines of code) ? Just my two eurocents... I understand this is not the scope of such a library (I mean game development...). But in my case, even warning statements (such as a wrong key binding or a network disconnection) should not slow the game. So maybe I need to use a more appropriate tool for the job. Too bad cause I tend to get addicted to log4j... a bit more than I should I guess as I would probably use it even to code HelloWorld ;) Thanks for your replies. Regards Herve -- To unsubscribe, e-mail: <mailto:log4j-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:log4j-dev-help@;jakarta.apache.org>