Interface LoggingConfigurer

All Known Implementing Classes:
Log4jConfigurer

public interface LoggingConfigurer
Simple interface for configuring logging levels.
  • Field Details

    • NAMED_LEVELS

      static final String[] NAMED_LEVELS
    • NUMBERED_LEVELS

      static final String[] NUMBERED_LEVELS
  • Method Details

    • getAllLoggerNames

      List<String> getAllLoggerNames()
      Obtain the list of all logger names.
      Returns:
    • configureAllLoggers

      void configureAllLoggers(int newLevel)
      Set the logging level of all loggers.
      Throws:
      IllegalArgumentException - if newLevel is invalid
    • configureAllLoggers

      default void configureAllLoggers(String newLevel)
      Set the logging level of all loggers using a named level.
      Throws:
      IllegalArgumentException - if newLevel is invalid
    • configureLogger

      void configureLogger(String loggerName, int newLevel) throws IllegalArgumentException
      Set the logging level of a specific logger.
      Throws:
      IllegalArgumentException - if loggerName or newLevel is invalid
    • configureLogger

      default void configureLogger(String loggerName, String newLevel) throws IllegalArgumentException
      Set the logging level of a specific logger using a named level.
      Throws:
      IllegalArgumentException - if loggerName or newLevel is invalid
    • apply

      void apply()
      Apply pending changes to the configuration.