|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.elca.el4j.services.monitoring.jmx.Log4jConfig
public class Log4jConfig
The logging proxy class, for setting logging properties via JMX.
| Field Summary | |
|---|---|
static String |
JVM_DOMAIN
The domain of the Logger bean proxy as it will be registered at the MBean Server. |
static String |
LOG4J_JMX_LOADER
The name of the 'log4jJmxLoader' bean. |
protected ApplicationContext |
m_applicationContext
The Application Context where this Spring Bean is registered at. |
protected ApplicationContextMB |
m_applicationContextMB
The Application Context proxy for the real Application Context. |
protected BeanFactory |
m_beanFactory
The Bean Factory belonging to the referenced Application Context. |
protected Class |
m_class
The class name of this class. |
| Constructor Summary | |
|---|---|
Log4jConfig(String name,
ApplicationContextMB acMB,
ApplicationContext ac,
BeanFactory beanFactory,
MBeanServer mBeanServer)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addAppender(String category,
String appenderName)
Add appender to the specified logger category. |
void |
changeLogLevel(String category,
String level)
Changes the log level for a category or creates a new category if the supplied category name doesn't exist. |
String[] |
getAvailableAppendersList()
For all loaded appenders, a String representaion of the appenderName and appenderObject is returned. |
String |
getInitialConfigurationPath()
Get the path of the log4j configuration file, which was loaded initially (at application start). |
int |
getInstanceCounter()
The getter method for the instanceCounter member. |
String |
getName()
Getter method for the name member variable. |
ObjectName |
getObjectName()
Getter method for the objectName member variable. |
String |
getRootLoggerLevel()
Gives back the level of the root logger. |
void |
init()
|
protected void |
registerSpringBean()
Register this SpringBean at the MBean Server. |
void |
removeAppender(String category,
String appenderName)
Remove appender from the specified logger category. |
void |
setAppendersPool(HashMap appenders)
|
void |
setInstanceCounter()
Save the class variable s_counter to an instance member and increment the class variable by 1. |
void |
setObjectName()
Sets the objectName to of this object. |
void |
setRootLoggerLevel(String level)
Sets the level of the root logger. |
org.apache.log4j.Appender[] |
showAppenders(String category)
Return the appenders of the specified Logger category. |
org.apache.log4j.Level |
showLogLevel(String category)
Return the log level of the Logger category. |
String |
showLogLevelCache()
Shows the XML representation of all changes made to any logger level through the JMX interface. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String JVM_DOMAIN
public static final String LOG4J_JMX_LOADER
protected ApplicationContext m_applicationContext
protected ApplicationContextMB m_applicationContextMB
protected Class m_class
protected BeanFactory m_beanFactory
| Constructor Detail |
|---|
public Log4jConfig(String name,
ApplicationContextMB acMB,
ApplicationContext ac,
BeanFactory beanFactory,
MBeanServer mBeanServer)
name - The bean definition name of this Spring BeanacMB - The Application Context proxyac - The real Application ContextbeanFactory - The Bean Factory belonging to this Application ContextmBeanServer - The MBean Server where this Spring Bean is registered at| Method Detail |
|---|
public void init()
throws BaseException
BaseException
protected void registerSpringBean()
throws BaseException
BaseException - in case the registration at the MBean Server failedpublic ObjectName getObjectName()
public void setObjectName()
public String getName()
getName in interface Log4jConfigMBeanpublic void setAppendersPool(HashMap appenders)
appenders - The appeenders list.
public void addAppender(String category,
String appenderName)
addAppender in interface Log4jConfigMBeancategory - The category of the logger.appenderName - The name of the appender to be removed.
public void removeAppender(String category,
String appenderName)
removeAppender in interface Log4jConfigMBeancategory - The category of the logger.appenderName - The name of the appender to be removed.public String[] getAvailableAppendersList()
getAvailableAppendersList in interface Log4jConfigMBean
public void changeLogLevel(String category,
String level)
changeLogLevel in interface Log4jConfigMBeancategory - The category of the logger.level - The level of the logger to be set.public org.apache.log4j.Level showLogLevel(String category)
showLogLevel in interface Log4jConfigMBeancategory - The category.
public org.apache.log4j.Appender[] showAppenders(String category)
showAppenders in interface Log4jConfigMBeancategory - The category.
public void setRootLoggerLevel(String level)
setRootLoggerLevel in interface Log4jConfigMBeanlevel - The logging level.public String getRootLoggerLevel()
getRootLoggerLevel in interface Log4jConfigMBeanpublic String showLogLevelCache()
showLogLevelCache in interface Log4jConfigMBeanpublic String getInitialConfigurationPath()
getInitialConfigurationPath in interface Log4jConfigMBeanpublic int getInstanceCounter()
public void setInstanceCounter()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||