Threshold is the second filter for registering messages
eg:
log4j.logger.TextProcessor=Debug,TextProcessor , InfoLogger . . . log4j.appender.TextProcessor.Threshold=Error
if Logger is set to DEBUG and appender. The threshold is set to Error, and only with the TextProcessor application only Error and messages with a higher severity will be logged.
Using the threshold - you can define another appender with different threshold levels, for example, in the above example, you can also enable InfoLogger with the Info level message protocol enabled
log4j.logger.TextProcessor=Debug,TextProcessor , InfoLogger . . . log4j.appender.InfoLogger.Threshold=INFO
To understand the levels, in log4j below are the logging levels :
FATAL: shows messages at a FATAL level only ERROR: Shows messages classified as ERROR and FATAL WARNING: Shows messages classified as WARNING, ERROR, and FATAL INFO: Shows messages classified as INFO, WARNING, ERROR, and FATAL DEBUG: Shows messages classified as DEBUG, INFO, WARNING, ERROR, and FATAL TRACE : Shows messages classified as TRACE,DEBUG, INFO, WARNING, ERROR, and FATAL ALL : Shows messages classified as TRACE,DEBUG, INFO, WARNING, ERROR, and FATAL OFF : No log messages display
go to url for more details
Shirishkumar Bari Apr 01 '14 at 6:58 a.m. 2014-04-01 06:58
source share