|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 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()
Fails the GBean. |
void |
doStart()
Starts the GBean. |
void |
doStop()
Stops the target. |
String |
getConfigFileName()
Get the logging configuration URL. |
String |
getConfiguration()
Get the content of logging configuration file. |
static 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 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 SystemLogpublic void setRootLoggerLevel(String level)
setRootLoggerLevel in interface SystemLoglevel - 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 SystemLogpublic void setRefreshPeriodSeconds(int period)
setRefreshPeriodSeconds in interface SystemLogperiod - the refresh period (in seconds)
IllegalArgumentException - if refresh period is < 5public String getConfigFileName()
getConfigFileName in interface SystemLogpublic void setConfigFileName(String configurationFile)
setConfigFileName in interface SystemLogconfigurationFile - the logging configuration filepublic String getConfiguration()
public void setConfiguration(String configuration)
throws IOException
configuration - the new content of logging configuration file
IOExceptionpublic 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 SystemLogSystemLog.MAX_SEARCH_RESULTSpublic void reconfigure()
public void doStart()
GBeanLifecycle
doStart in interface GBeanLifecyclepublic void doStop()
GBeanLifecycle
doStop in interface GBeanLifecyclepublic void doFail()
GBeanLifecycle
doFail in interface GBeanLifecyclepublic static GBeanInfo getGBeanInfo()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||