Package org.apache.activemq.broker.jmx
Class Log4JConfigView
java.lang.Object
org.apache.activemq.broker.jmx.Log4JConfigView
- All Implemented Interfaces:
Log4JConfigViewMBean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidlist of all the logger names and their levelsgetLogLevel(String loggerName) Get the log level for a given loggerGet the log level for the root loggerstatic booleanvoidReloads 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
-
Constructor Details
-
Log4JConfigView
public Log4JConfigView()
-
-
Method Details
-
getRootLogLevel
Description copied from interface:Log4JConfigViewMBeanGet the log level for the root logger- Specified by:
getRootLogLevelin interfaceLog4JConfigViewMBean- Throws:
Exception- if an error occurs while getting the root level.
-
setRootLogLevel
Description copied from interface:Log4JConfigViewMBeanGet the log level for the root logger- Specified by:
setRootLogLevelin interfaceLog4JConfigViewMBean- Parameters:
level- the new level to assign to the root logger.- Throws:
Exception- if an error occurs while setting the root level.
-
getLoggers
Description copied from interface:Log4JConfigViewMBeanlist of all the logger names and their levels- Specified by:
getLoggersin interfaceLog4JConfigViewMBean- Returns:
- a List of all known loggers names.
- Throws:
Exception- if an error occurs while getting the loggers.
-
getLogLevel
Description copied from interface:Log4JConfigViewMBeanGet the log level for a given logger- Specified by:
getLogLevelin interfaceLog4JConfigViewMBean- 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
Description copied from interface:Log4JConfigViewMBeanSet the log level for a given logger- Specified by:
setLogLevelin interfaceLog4JConfigViewMBean- 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
Description copied from interface:Log4JConfigViewMBeanReloads log4j.properties from the classpath.- Specified by:
reloadLog4jPropertiesin interfaceLog4JConfigViewMBean- Throws:
Exception- if an error occurs trying to reload the config file.Throwable
-
doReloadLog4jProperties
- Throws:
Throwable
-
isLog4JAvailable
public static boolean isLog4JAvailable()
-