|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cocoon.monitoring.reconfiguration.Log4JReconfigurator
@ManagedResource(objectName="org.apache.cocoon:group=Reconfiguration,name=Log4JReconfigurator") public class Log4JReconfigurator
This is a JMX MBean class that expose methods for log4j configuration.
Constructor Summary | |
---|---|
Log4JReconfigurator()
|
Method Summary | |
---|---|
String[] |
getLoggers()
Find all configured loggers and returns is as a array of String s |
boolean |
loadNewConfigurationFile(String path)
Allows to change configuration of log4j on the fly. |
boolean |
setLoggingLevel(String category,
String newLogLevel)
Sets logging level for a particular package or a class. |
boolean |
setLoggingTempoporalLevel(String category,
String temporalLogLevel,
String timeOut)
Sets new logging level for amount of time. |
void |
setSettings(org.apache.cocoon.configuration.Settings s)
Inject the settings object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Log4JReconfigurator()
Method Detail |
---|
@ManagedAttribute(description="Return a list of all configured loggers with their level.") public final String[] getLoggers()
String
s
@ManagedOperation(description="Sets logging level for a particular package or a class. Returns true if operation was successful.") @ManagedOperationParameters(value={,}) public final boolean setLoggingLevel(String category, String newLogLevel)
category
- name of the log category (usually a package or class name) whose log level
should be changed.newLogLevel
- new log level for that category. Available log levels are:
OFF
, INFO
, WARN
, ERROR
,
FATAL
, TRACE
, DEBUG
, ALL
true
if operation was successful, false
otherwise.@ManagedOperation(description="Sets new logging level for amount of time. After timeout log level is set back to old value.") @ManagedOperationParameters(value={,,}) public final boolean setLoggingTempoporalLevel(String category, String temporalLogLevel, String timeOut)
category
- name of the log category (usually a package or class name) whose log level
should be changed.temporalLogLevel
- temporal log level for that category that should be set for specified
amount of time.timeOut
- amount of time that temporalLevel should be active. Value of timeOut should
match regular expression: ^[0-9.]+[dhm]?$ where d
means day,
h
hours and m
minutes
true
if operation was successful, false
otherwise.@ManagedOperation(description="Allows to change configuration of log4j on the fly. This function support both XML and properties configuration files. Before reloading configuration it checks that the new config file contains at least one appender and all output files are accessible (for XML configs italso validate XML syntax using schema or DTD)") @ManagedOperationParameters(value=) public final boolean loadNewConfigurationFile(String path) throws Exception
path
- absolute path to configuration file located on the server.
true
if operation was successful, false
otherwise.
Exception
- if something unusual happenspublic final void setSettings(org.apache.cocoon.configuration.Settings s)
s
- The settings bean.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |