Package org.apache.activemq.broker.jmx
Interface Log4JConfigViewMBean
-
- All Known Implementing Classes:
Log4JConfigView
public interface Log4JConfigViewMBeanLog4J Configuration Management MBean used to alter the runtime log levels or force a reload of the Log4J configuration file.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<String>getLoggers()list of all the logger names and their levelsStringgetLogLevel(String loggerName)Get the log level for a given loggerStringgetRootLogLevel()Get the log level for the root loggervoidreloadLog4jProperties()Reloads log4j.properties from the classpath.voidsetLogLevel(String loggerName, String level)Set the log level for a given loggervoidsetRootLogLevel(String level)Get the log level for the root logger
-
-
-
Method Detail
-
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.
-
-