Interface Log4JConfigViewMBean

All Known Implementing Classes:
Log4JConfigView

public interface Log4JConfigViewMBean
Log4J Configuration Management MBean used to alter the runtime log levels or force a reload of the Log4J configuration file.
  • Method Details

    • getRootLogLevel

      String getRootLogLevel() throws Exception
      Get the log level for the root logger
      Throws:
      Exception - if an error occurs while getting the root level.
    • setRootLogLevel

      void setRootLogLevel(String level) throws Exception
      Get the log level for the root logger
      Parameters:
      level - the new level to assign to the root logger.
      Throws:
      Exception - if an error occurs while setting the root level.
    • getLoggers

      List<String> getLoggers() throws Exception
      list of all the logger names and their levels
      Returns:
      a List of all known loggers names.
      Throws:
      Exception - if an error occurs while getting the loggers.
    • getLogLevel

      String getLogLevel(String loggerName) throws Exception
      Get the log level for a given logger
      Parameters:
      loggerName - the name of the logger whose level should be queried.
      Returns:
      the current log level of the given logger.
      Throws:
      Exception - if an error occurs while getting the log level.
    • setLogLevel

      void setLogLevel(String loggerName, String level) throws Exception
      Set the log level for a given logger
      Parameters:
      loggerName - the name of the logger whose level is to be adjusted.
      level - the new level to assign the given logger.
      Throws:
      Exception - if an error occurs while setting the log level.
    • reloadLog4jProperties

      void reloadLog4jProperties() throws Throwable
      Reloads log4j.properties from the classpath.
      Throws:
      Exception - if an error occurs trying to reload the config file.
      Throwable