Configuration
Logging is a standard method for monitoring the health of an application and diagnosing problems that may arise within it. Even moderately sized applications can contain thousands of logging statements.
To decide which of these statements will be logged and where, users need to configure Log4j Core in one of two ways:
-
through a Configuration file. Since version 2.0, the configuration file format has been considered part of the public API and has remained stable across significant version upgrades.
-
through Programmatic Configuration, which provides a larger spectrum of possible customizations but might require code changes during version upgrades.
To prevent a chicken-and-egg problem, users can only supply some configuration options (e.g., the configuration file location) through configuration properties. |