org.ow2.jonas.lib.jmbeans.log
Class LogManagement

java.lang.Object
  extended by org.ow2.jonas.lib.management.javaee.ManagedObject
      extended by org.ow2.jonas.lib.jmbeans.log.LogManagement

public class LogManagement
extends ManagedObject

MBean implementation for log management. The managed resource is the monolog LoggerFactory.


Field Summary
static String SERVICE_NAME
          Name as used to label configuration properties.
 
Fields inherited from class org.ow2.jonas.lib.management.javaee.ManagedObject
logger
 
Constructor Summary
LogManagement()
           
 
Method Summary
 String getConfigFile()
           
 Map getHandlerAttributes(String handlername)
          Getter for the map of the attributes of a handler.
 String[] getHandlerNames()
          Returns the names of the Monolog handlers
 Properties getProperties()
           
 Properties getProps()
           
 String getTopicLevel(String topic)
          Return a topic's level
 String[] getTopics()
           
 void saveConfig()
          Save updated configuration.
 void setConfigFile(String configFile)
           
 void setProps(Properties props)
           
 void setTopicLevel(String topic, String level)
          set Topic Level
 
Methods inherited from class org.ow2.jonas.lib.management.javaee.ManagedObject
sendNotification, sendReconfigNotification, sendSaveNotification, setModelMBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_NAME

public static final String SERVICE_NAME
Name as used to label configuration properties.

See Also:
Constant Field Values
Constructor Detail

LogManagement

public LogManagement()
Method Detail

getTopics

public String[] getTopics()
Returns:
the topics list. Assumes that all Loggers are TopicalLoggers.

getTopicLevel

public String getTopicLevel(String topic)
Return a topic's level

Parameters:
topic - the topic we need ti know its level
Returns:
the topic's level

setTopicLevel

public void setTopicLevel(String topic,
                          String level)
set Topic Level

Parameters:
topic - topic to set
level - the level to set

getProperties

public Properties getProperties()
Returns:
list of properties for logging system

saveConfig

public void saveConfig()
Save updated configuration.


getHandlerNames

public String[] getHandlerNames()
Returns the names of the Monolog handlers

Returns:
The handler names defines in Monolog

getHandlerAttributes

public Map getHandlerAttributes(String handlername)
Getter for the map of the attributes of a handler.

Parameters:
handlername - the handler name
Returns:
The map of the attributes defines for the handler

getProps

public Properties getProps()
Returns:
Configuration properties

setProps

public void setProps(Properties props)
Parameters:
props - Configuration properties

getConfigFile

public String getConfigFile()
Returns:
Configuration file name

setConfigFile

public void setConfigFile(String configFile)
Parameters:
configFile - Configuration file name


Copyright © 2010 OW2 Consortium. All Rights Reserved.