|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.monitoring.reconfiguration.LogbackReconfigurator
@ManagedResource(objectName="org.apache.cocoon:group=Reconfiguration,name=LogbackReconfigurator") public class LogbackReconfigurator
This is a JMX MBean class that expose methods for logback configuration.
Constructor Summary | |
---|---|
LogbackReconfigurator()
|
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 logback 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 settings)
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 LogbackReconfigurator()
Method Detail |
---|
public final void setSettings(org.apache.cocoon.configuration.Settings settings)
s
- The settings bean.@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
, ERROR
, WARN
, INFO
,
DEBUG
, TRACE
, 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 logback on the fly. Before reloading the configuration it checks that the new config file contains at least one appender, that all output files are accessible and that the file is valid as XML.") @ManagedOperationParameters(value=) public final boolean loadNewConfigurationFile(String path) throws IOException, ConfigurationException, ch.qos.logback.core.joran.spi.JoranException
path
- absolute path to configuration file located on the server.
true
if operation was successful, false
otherwise.
Exception
- if something unusual happens
IOException
ConfigurationException
ch.qos.logback.core.joran.spi.JoranException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |