|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.catalina.logger.LoggerBase | +--org.apache.catalina.logger.FileLogger
Implementation of Logger that appends log messages to a file named {prefix}.{date}.{suffix} in a configured directory, with an optional preceding timestamp.
Field Summary | |
protected static java.lang.String |
info
The descriptive information about this implementation. |
protected LifecycleSupport |
lifecycle
The lifecycle event support for this component. |
Fields inherited from class org.apache.catalina.logger.LoggerBase |
container,
info,
support,
verbosity |
Fields inherited from interface org.apache.catalina.Lifecycle |
START_EVENT,
STOP_EVENT |
Constructor Summary | |
FileLogger()
|
Method Summary | |
void |
addLifecycleListener(LifecycleListener listener)
Add a lifecycle event listener to this component. |
java.lang.String |
getDirectory()
Return the directory in which we create log files. |
java.lang.String |
getPrefix()
Return the log file prefix. |
java.lang.String |
getSuffix()
Return the log file suffix. |
boolean |
getTimestamp()
Return the timestamp flag. |
void |
log(java.lang.String msg)
Writes the specified message to a servlet log file, usually an event log. |
void |
removeLifecycleListener(LifecycleListener listener)
Remove a lifecycle event listener from this component. |
void |
setDirectory(java.lang.String directory)
Set the directory in which we create log files. |
void |
setPrefix(java.lang.String prefix)
Set the log file prefix. |
void |
setSuffix(java.lang.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. |
Methods inherited from class org.apache.catalina.logger.LoggerBase |
addPropertyChangeListener,
getContainer,
getInfo,
getVerbosity,
log,
log,
log,
log,
removePropertyChangeListener,
setContainer,
setVerbosity,
setVerbosityLevel |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected static final java.lang.String info
protected LifecycleSupport lifecycle
Constructor Detail |
public FileLogger()
Method Detail |
public java.lang.String getDirectory()
public void setDirectory(java.lang.String directory)
directory
- The new log file directorypublic java.lang.String getPrefix()
public void setPrefix(java.lang.String prefix)
prefix
- The new log file prefixpublic java.lang.String getSuffix()
public void setSuffix(java.lang.String suffix)
suffix
- The new log file suffixpublic boolean getTimestamp()
public void setTimestamp(boolean timestamp)
timestamp
- The new timestamp flagpublic void log(java.lang.String msg)
msg
- A String
specifying the message to be written
to the log filepublic void addLifecycleListener(LifecycleListener listener)
listener
- The listener to addpublic void removeLifecycleListener(LifecycleListener listener)
listener
- The listener to addpublic void start() throws LifecycleException
configure()
,
and before any of the public methods of the component are utilized.public void stop() throws LifecycleException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |