org.apache.catalina.logger
Class FileLogger
- Lifecycle, Logger, MBeanRegistration
Implementation of Logger that appends log messages to a file
named {prefix}.{date}.{suffix} in a configured directory, with an
optional preceding timestamp.
Version:
- Craig R. McClanahan
protected static String | info - The descriptive information about this implementation.
|
container , controller , debug , domain , host , info , lifecycle , mserver , oname , path , support , verbosity |
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.
|
addLifecycleListener , addPropertyChangeListener , createObjectName , destroy , findLifecycleListeners , getContainer , getController , getDebug , getDomain , getInfo , getObjectName , getVerbosity , init , log , log , log , log , log , postDeregister , postRegister , preDeregister , preRegister , removeLifecycleListener , removePropertyChangeListener , setContainer , setController , setDebug , setVerbosity , setVerbosityLevel , start , stop |
info
protected static final String info
The descriptive information about this implementation.
getDirectory
public String getDirectory()
Return the directory in which we create log files.
getPrefix
public String getPrefix()
Return the log file prefix.
getSuffix
public String getSuffix()
Return the log file suffix.
getTimestamp
public boolean getTimestamp()
Return the timestamp flag.
log
public void log(String msg)
Writes the specified message to a servlet log file, usually an event
log. The name and type of the servlet log is specific to the
servlet container.
- log in interface Logger
- log in interface LoggerBase
msg
- A String
specifying the message to be written
to the log file
setDirectory
public void setDirectory(String directory)
Set the directory in which we create log files.
directory
- The new log file directory
setPrefix
public void setPrefix(String prefix)
Set the log file prefix.
prefix
- The new log file prefix
setSuffix
public void setSuffix(String suffix)
Set the log file suffix.
suffix
- The new log file suffix
setTimestamp
public void setTimestamp(boolean timestamp)
Set the timestamp flag.
timestamp
- The new timestamp flag
start
public void start()
throws LifecycleException
Prepare for the beginning of active use of the public methods of this
component. This method should be called after configure()
,
and before any of the public methods of the component are utilized.
- start in interface Lifecycle
- start in interface LoggerBase
LifecycleException
- if this component detects a fatal error
that prevents this component from being used
stop
public void stop()
throws LifecycleException
Gracefully terminate the active use of the public methods of this
component. This method should be the last one called on a given
instance of this component.
- stop in interface Lifecycle
- stop in interface LoggerBase
LifecycleException
- if this component detects a fatal error
that needs to be reported
Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.