Interface LoggingService


public interface LoggingService
Service API for managing logging at runtime.
Since:
2.10
Version:
1.0
Author:
matt
  • Field Details

    • TOPIC_UPDATE_LOGGER

      static final String TOPIC_UPDATE_LOGGER
      The instruction topic for a request to set a logger level to one or more loggers.

      The following instruction parameters must be provided:

      logger
      The name of the logger to update the level of, for example net.solarnetwork.node.io, or a comma-delimited list of loggers. This parameter can also be repeated multiple times to change the level of multiple loggers at once.
      level
      The logger level, one of the LoggingService.Level enumeration values (case-insensitive).
      See Also:
    • PARAM_LOGGER_NAME

      static final String PARAM_LOGGER_NAME
      The instruction parameter for a logger name.
      See Also:
    • PARAM_LOGGER_LEVEL

      static final String PARAM_LOGGER_LEVEL
      The instruction parameter for a LoggingService.Level name.
      See Also:
  • Method Details

    • loggers

      Collection<String> loggers()
      Get a collection of all known loggers.

      This represents the list of active loggers in the system.

      Returns:
      the loggers, never null
    • loggerLevels

      Get all available logger levels.

      This represents the current runtime configuration of logger levels, which may be lost if the application is restarted.

      Returns:
      the current logger levels, never null
    • changeLevels

      void changeLevels(Map<String,LoggingService.Level> levels)
      Adjust logger levels.
      Parameters:
      levels - a mapping of logger names to desired levels