If you have trouble getting your head around Loggers (ex Categories) and Appenders, perhaps it will help to think of them as sources and sinks with filtering methods available on each.

Sources

In log4cxx/log4j context Logger objects are the sources of logging data. Older examples or documentation may refer to the Category object. It is essentially the same thing. Logger has replaced Category.

Sinks

Appenders are the data sinks. As explained in the API docs and wiki page on the topic a Logger's source data can go to one or more sinks.

Filters

You can filter Logger statements by changing the log level for a given logger. This turns on or off various source points for a given logger if it uses various log levels. You can override all the Loggers levels by setting the Threshold of the LoggerRepository object. (It is ALL by default)

Once a Logger has emitted a log statement, it will be written by any Appenders attached to it unless it fails to meet their optional Filter or Threshold filters (part of AppenderSkeleton.)

SourcesSinksAndFilters (last edited 2009-09-20 23:45:56 by localhost)