Interface LoggingService


public interface LoggingService
Service that allows runtime configuration of the logging subsystem.
  • Method Summary

    Modifier and Type
    Method
    Description
    getLevel(String loggerName)
    Retrieves the effective logging level of the specified logger.
     
    void
    setLevel(String loggerName, String level)
    Sets the level for the specified logger to the provided level.
    void
    Sets the output level for the root logger, which is a special logger that is the ultimate parent of all other loggers in the system.
  • Method Details

    • getLevel

      @Nonnull String getLevel(String loggerName)
      Retrieves the effective logging level of the specified logger. The effective logging level is level that is defined for the specified logger or, if no level is defined for the specified logger, the effective level for its parent logger.
      Parameters:
      loggerName - the name of the logger to retrieve the output level for
      Returns:
      the effective logging level of the specified logger
    • getRootLevel

      @Nonnull String getRootLevel()
      Returns:
      the effective logging level for the root logger, which is the ultimate parent of all loggers in the system
    • setLevel

      void setLevel(String loggerName, String level)
      Sets the level for the specified logger to the provided level. Valid levels are:
      • OFF
      • TRACE
      • DEBUG
      • INFO
      • WARN
      • ERROR
      The special level OFF disables all output from the specified logger. All other levels include output at that specific level as well as all output from the levels below them (meaning TRACE will include output at DEBUG, INFO, WARN and ERROR levels).
      Parameters:
      loggerName - the name of the logger to adjust the output level for
      level - the new output level for the logger
    • setRootLevel

      void setRootLevel(String level)
      Sets the output level for the root logger, which is a special logger that is the ultimate parent of all other loggers in the system.
      Parameters:
      level - the new output level for the root logger
      See Also: