Java logging framework: Difference between revisions

Content deleted Content added
Rwgjr (talk | contribs)
Rwgjr (talk | contribs)
No edit summary
Line 63:
 
Severity levels can be assigned to both loggers and appenders. Both must be enabled for a given severity level for output to be generated. So a logger enabled for debug output will not generate output if the handler that gets the message is not also enabled for debug.
 
===Filters===
 
Filters cause a log event to be ignored or logged. The most commonly used filter is the logging level documented in the previous section. Logging frameworks such as Log4j 2 and SLF4J also provide Markers, which when attached to a log event can also be used for filtering. Filters can also be used to accept or deny log events based on exceptions being thrown, data within the log message, data in a ThreadLocal that is exposed through the logging API, or a variety of other methods.
 
===Formatters, Layouts or renderers===