问题
Can any one tell me, what is package level logging in log4j ? And how to enable this, today my interview question am unable to answer this :-(
Even i didn't find good solution in Google.
thank you so much.
回答1:
Package level logging is the standard logging of log4j. With log4j configuration, you'd specify the package and the associated level.
In the intro example, there is package level logging for "com.foo".
# Print only messages of level WARN or above in the package com.foo.
log4j.logger.com.foo=WARN
来源:https://stackoverflow.com/questions/10648681/how-to-enable-package-level-logging-in-log4j