|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.geronimo.system.logging.log4j.Log4jService
public class Log4jService
A Log4j logging service.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.geronimo.system.logging.SystemLog |
---|
SystemLog.LogMessage, SystemLog.SearchResults |
Field Summary | |
---|---|
static org.apache.geronimo.gbean.GBeanInfo |
GBEAN_INFO
|
Fields inherited from interface org.apache.geronimo.system.logging.SystemLog |
---|
MAX_SEARCH_RESULTS |
Constructor Summary | |
---|---|
Log4jService(String configurationFile,
int refreshPeriod,
ServerInfo serverInfo)
Construct a Log4jService . |
Method Summary | |
---|---|
void |
doFail()
|
void |
doStart()
|
void |
doStop()
|
String |
getConfigFileName()
Get the logging configuration URL. |
String |
getConfiguration()
Get the content of logging configuration file. |
static org.apache.geronimo.gbean.GBeanInfo |
getGBeanInfo()
|
String[] |
getLogFileNames()
Gets the name of all log files used by this log system. |
String |
getLoggerEffectiveLevel(String logger)
Gets the level of the logger of the give name. |
String |
getLoggerLevel(String logger)
Gets the level of the logger of the give name. |
SystemLog.SearchResults |
getMatchingItems(String logFile,
Integer firstLine,
Integer lastLine,
String minLevel,
String text,
int maxResults,
boolean includeStackTraces)
Searches the log for records matching the specified parameters. |
int |
getRefreshPeriodSeconds()
Get the refresh period. |
String |
getRootLoggerLevel()
Gets the level of the root logger. |
void |
reconfigure()
Force the logging system to reconfigure. |
void |
setConfigFileName(String configurationFile)
Set the logging configuration URL. |
void |
setConfiguration(String configuration)
Overwrites the content of logging configuration file. |
void |
setLoggerLevel(String logger,
String level)
Sets the level for a logger of the give name. |
void |
setRefreshPeriodSeconds(int period)
Set the refresh period. |
void |
setRootLoggerLevel(String level)
Sets the level of the root logger. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
Constructor Detail |
---|
public Log4jService(String configurationFile, int refreshPeriod, ServerInfo serverInfo)
Log4jService
.
configurationFile
- The log4j configuration file.refreshPeriod
- The refresh refreshPeriod (in seconds).Method Detail |
---|
public String getRootLoggerLevel()
getRootLoggerLevel
in interface SystemLog
public void setRootLoggerLevel(String level)
setRootLoggerLevel
in interface SystemLog
level
- The level to change the logger to.public String getLoggerEffectiveLevel(String logger)
logger
- The logger to inspect.public String getLoggerLevel(String logger)
logger
- The logger to inspect.public void setLoggerLevel(String logger, String level)
logger
- The logger to change levellevel
- The level to change the logger to.public int getRefreshPeriodSeconds()
getRefreshPeriodSeconds
in interface SystemLog
public void setRefreshPeriodSeconds(int period)
setRefreshPeriodSeconds
in interface SystemLog
period
- the refresh period (in seconds)
IllegalArgumentException
- if refresh period is <= 0public String getConfigFileName()
getConfigFileName
in interface SystemLog
public void setConfigFileName(String configurationFile)
setConfigFileName
in interface SystemLog
configurationFile
- the logging configuration filepublic String getConfiguration()
public void setConfiguration(String configuration) throws IOException
configuration
- the new content of logging configuration file
IOException
public String[] getLogFileNames()
SystemLog
getLogFileNames
in interface SystemLog
public SystemLog.SearchResults getMatchingItems(String logFile, Integer firstLine, Integer lastLine, String minLevel, String text, int maxResults, boolean includeStackTraces)
SystemLog
getMatchingItems
in interface SystemLog
SystemLog.MAX_SEARCH_RESULTS
public void reconfigure()
public void doStart()
doStart
in interface org.apache.geronimo.gbean.GBeanLifecycle
public void doStop()
doStop
in interface org.apache.geronimo.gbean.GBeanLifecycle
public void doFail()
doFail
in interface org.apache.geronimo.gbean.GBeanLifecycle
public static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |