wt.log4j.jmx
Interface LoggerRepositoryMonitorMBean

All Superinterfaces:
SelfEmailingMBean

public interface LoggerRepositoryMonitorMBean
extends SelfEmailingMBean

Log4j logging configuration

Supported API: true

Extendable: true


Field Summary
static String ADD_APPENDER_NOTIF_TYPE
          Type of notification produced when a log4j appender is added

Supported API: true
static String RECONFIGURED_NOTIF_TYPE
          Type of notification produced when log4j is reconfigured through this MBean

Supported API: true
 
Method Summary
 void emailConfigurationFile(String addressesOrEmailList, String subject)
          E-mail the log4j configuration file

Supported API: true
 String[] getAppenderNames()
          Names of all known appenders

Supported API: true
 int getConfigurationCheckInterval()
          Interval (in seconds) at which configuration file is checked for changes

Supported API: true
 String getConfigurationFileRef()
          Reference to configuration file (via URL, file path, or resource path), if known/provided; this attribute is externally controlled and is not persisted with this MBean

Supported API: true
 String getConfigurationURLString()
          Configuration as an absolute URL reference

Supported API: true
 String getLevel(String loggerName)
          Get log level for a given logger.
 String[] getLoggerNames()
          Names of all loggers registered with this logging hierarchy

Supported API: true
 String getThreshold()
          Global logging level below which log events are immediately ignored; valid values are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (or blank/unspecified)

Supported API: true
 boolean isHierarchicalLoggerDisplay()
          Whether loggers MBeans use hierarchically displayable names

Supported API: true
 void reconfigure()
          Reapplies logging configuration when Configuration is known, else does nothing

Supported API: true
 void registerLogger(String loggerName)
          Ensure set of logger management entries includes a particular existing logger, if it exists

Supported API: true
 void registerLogger(String loggerName, boolean create)
          Ensure set of logger management entries includes a particular existing logger, creating the logger as necessary

Supported API: true
 void registerLoggers()
          Ensure set of logger management entries matches current set of loggers

Supported API: true
 void registerLoggers(String matchingExpression)
          Register all loggers whose names match the given regular expression

Supported API: true
 void setConfigurationCheckInterval(int configurationCheckInterval)
          Interval (in seconds) at which configuration file is checked for changes

Supported API: true
 void setConfigurationFileRef(String configurationFileRef)
          Reference to configuration file (via URL, file path, or resource path), if known/provided; this attribute is externally controlled and is not persisted with this MBean

Supported API: true
 void setHierarchicalLoggerDisplay(boolean hierarchicalLoggerDisplay)
          Whether loggers MBeans use hierarchically displayable names

Supported API: true
 void setLevel(String loggerName, String level)
          Set log level for a given logger.
 void setThreshold(String threshold)
          Global logging level below which log events are immediately ignored; valid values are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (or blank/unspecified)

Supported API: true
 String[] viewConfigurationFile()
          View the log4j configuration file

Supported API: true
 
Methods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean
emailThisMBean
 

Field Detail

ADD_APPENDER_NOTIF_TYPE

static final String ADD_APPENDER_NOTIF_TYPE
Type of notification produced when a log4j appender is added

Supported API: true


RECONFIGURED_NOTIF_TYPE

static final String RECONFIGURED_NOTIF_TYPE
Type of notification produced when log4j is reconfigured through this MBean

Supported API: true

Method Detail

getConfigurationURLString

String getConfigurationURLString()
Configuration as an absolute URL reference

Supported API: true


getConfigurationFileRef

String getConfigurationFileRef()
Reference to configuration file (via URL, file path, or resource path), if known/provided; this attribute is externally controlled and is not persisted with this MBean

Supported API: true


setConfigurationFileRef

void setConfigurationFileRef(String configurationFileRef)
                             throws IOException
Reference to configuration file (via URL, file path, or resource path), if known/provided; this attribute is externally controlled and is not persisted with this MBean

Supported API: true

Throws:
IOException

getConfigurationCheckInterval

int getConfigurationCheckInterval()
Interval (in seconds) at which configuration file is checked for changes

Supported API: true


setConfigurationCheckInterval

void setConfigurationCheckInterval(int configurationCheckInterval)
Interval (in seconds) at which configuration file is checked for changes

Supported API: true


isHierarchicalLoggerDisplay

boolean isHierarchicalLoggerDisplay()
Whether loggers MBeans use hierarchically displayable names

Supported API: true


setHierarchicalLoggerDisplay

void setHierarchicalLoggerDisplay(boolean hierarchicalLoggerDisplay)
Whether loggers MBeans use hierarchically displayable names

Supported API: true


getAppenderNames

String[] getAppenderNames()
Names of all known appenders

Supported API: true


getLoggerNames

String[] getLoggerNames()
Names of all loggers registered with this logging hierarchy

Supported API: true


getThreshold

String getThreshold()
Global logging level below which log events are immediately ignored; valid values are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (or blank/unspecified)

Supported API: true


setThreshold

void setThreshold(String threshold)
Global logging level below which log events are immediately ignored; valid values are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (or blank/unspecified)

Supported API: true


registerLoggers

void registerLoggers()
Ensure set of logger management entries matches current set of loggers

Supported API: true


registerLogger

void registerLogger(String loggerName)
Ensure set of logger management entries includes a particular existing logger, if it exists

Supported API: true

Parameters:
loggerName - Name of logger

registerLogger

void registerLogger(String loggerName,
                    boolean create)
Ensure set of logger management entries includes a particular existing logger, creating the logger as necessary

Supported API: true

Parameters:
loggerName - Name of logger
create - Whether to create logger if it does not already exist

registerLoggers

void registerLoggers(String matchingExpression)
Register all loggers whose names match the given regular expression

Supported API: true

Parameters:
matchingExpression - Regular expression; MBeans will be registered for all loggers whose names match this

getLevel

String getLevel(String loggerName)
Get log level for a given logger.

Supported API: true

Parameters:
loggerName - Name of logger

setLevel

void setLevel(String loggerName,
              String level)
Set log level for a given logger.

Supported API: true

Parameters:
loggerName - Name of logger
level - Level to assign logger; valid values are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (or blank/unspecified)

reconfigure

void reconfigure()
                 throws IOException
Reapplies logging configuration when Configuration is known, else does nothing

Supported API: true

Throws:
IOException

viewConfigurationFile

String[] viewConfigurationFile()
                               throws IOException
View the log4j configuration file

Supported API: true

Throws:
IOException

emailConfigurationFile

void emailConfigurationFile(String addressesOrEmailList,
                            String subject)
                            throws IOException
E-mail the log4j configuration file

Supported API: true

Parameters:
addressesOrEmailList - Comma-delimited list of e-mail addresses or name of e-mail list to send e-mail to
subject - Subject to give e-mail
Throws:
IOException