public class FileLogger extends LoggerBase
| Modifier and Type | Field and Description |
|---|---|
protected static String |
info
The descriptive information about this implementation.
|
container, controller, debug, lifecycle, log, oname, rb, support, verbosityAFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, INIT_EVENT, START_EVENT, STOP_EVENT| Constructor and Description |
|---|
FileLogger() |
| Modifier and Type | Method and Description |
|---|---|
String |
getDirectory()
Return the directory in which we create log files.
|
String |
getPrefix()
Return the log file prefix.
|
String |
getSuffix()
Return the log file suffix.
|
boolean |
getTimestamp()
Return the timestamp flag.
|
void |
log(String msg)
Writes the specified message to a servlet log file, usually an event
log.
|
void |
setDirectory(String directory)
Set the directory in which we create log files.
|
void |
setPrefix(String prefix)
Set the log file prefix.
|
void |
setSuffix(String suffix)
Set the log file suffix.
|
void |
setTimestamp(boolean timestamp)
Set the timestamp flag.
|
void |
start()
Prepare for the beginning of active use of the public methods of this
component.
|
void |
stop()
Gracefully terminate the active use of the public methods of this
component.
|
addHandler, addLifecycleListener, addPropertyChangeListener, createObjectName, destroy, findLifecycleListeners, getContainer, getController, getDebug, getInfo, getObjectName, getVerbosity, init, log, log, log, log, removeLifecycleListener, removePropertyChangeListener, setContainer, setController, setDebug, setLevel, setVerbosity, setVerbosityLevelprotected static final String info
public String getDirectory()
public void setDirectory(String directory)
directory - The new log file directorypublic String getPrefix()
public void setPrefix(String prefix)
prefix - The new log file prefixpublic String getSuffix()
public void setSuffix(String suffix)
suffix - The new log file suffixpublic boolean getTimestamp()
public void setTimestamp(boolean timestamp)
timestamp - The new timestamp flagpublic void log(String msg)
log in interface Loggerlog in class LoggerBasemsg - A String specifying the message to be written
to the log filepublic void start()
throws LifecycleException
configure(),
and before any of the public methods of the component are utilized.start in interface Lifecyclestart in class LoggerBaseLifecycleException - if this component detects a fatal error
that prevents this component from being usedpublic void stop()
throws LifecycleException
stop in interface Lifecyclestop in class LoggerBaseLifecycleException - if this component detects a fatal error
that needs to be reportedCopyright © 2019. All rights reserved.