Skip to main content

Logging severity levels

Klogging levels

Klogging has 6 levels of logging severity with these names and general meanings:

NameMeaning
TRACEFine detailed information about what is happening.
DEBUGDetailed information about what is happening.
INFOGeneral information about what is happening.
WARNA warning that something unexpected or undesirable has happened.
ERRORAn error condition has occurred that requires attention.
FATALA serious error condition has occurred that has caused the program to stop.

These levels are specified by the Level enum.

Logger functions and levels

Levels are specified when logging, either in the Klogger#log function, for example:

    logger.log(Level.INFO, "User {user} logged in", user)

or using convenience functions, like this:

  • logger.trace("User {user} logged in", user)
  • logger.debug("User {user} logged in", user)
  • logger.info("User {user} logged in", user)
  • logger.warn("User {user} logged in", user)
  • logger.error("User {user} logged in", user)
  • logger.fatal("User {user} logged in", user)