What log level to use?

A Severity Level (def) is a quality of a logging message. Assign a severity level to every logging message that you emit from program code.Having severity levels assigned to logging messages allows filtering out messages
that are not of interest. The following severity levels are provided:

  • FATAL: means that an exceptional context/event will lead to a process termination. In EL4NET, errors in config and early components initialization errors are fatal.
  • ERROR: means that an unexpected issue has occurred. In EL4NET, unexpected exceptions are logged as errors. A generic swallow (i.e. with generic catch clause) should use this level.
  • WARN: means that some rare event occurred which might be an issue but doesn’t have to. In EL4NET, a recovery mechanism makes that a lazy component that fails to initialize and that later succeeds, leads to an exception the first time, and a warning the second time, saying that the component is already created but not initialized.
  • NOTICE: used for logging important state of the system. In EL4NET, status is used to notify when all static components are loaded.
  • INFO: used for logging internal state of the system. In EL4NET, info is used to notify when one static components is loaded.
  • DEBUG: used for debugging/development purpose; may very rarely be used in operational scenarios to state the system. In EL4NET, debug is used to display proxy generator steps.

 
 
 

Leave a Reply