tags:

views:

13

answers:

0

Hello,

How does logging frameworks/libraries work?

For example log4j has logging levels viz, INFO, DEBUG etc, when I say LOG_DEBUG (some message), will the log4j code check every time if the log_level is set to DEBUG, if yes then log the message.

If yes and if my code has 1000 LOG_DEBUG statements then isDebugLevel() is checked 1000 times.

I believe I am asking a basic question. I am sorry if it is annoying, but, I could not find answers on the web.

Thank you. -Raghu