org.apache.catalina.logger
クラス FileLogger

java.lang.Object
  |
  +--org.apache.catalina.logger.LoggerBase
        |
        +--org.apache.catalina.logger.FileLogger
すべての実装インタフェース:
Lifecycle, Logger

public final class FileLogger
extends LoggerBase
implements Lifecycle

Implementation of Logger that appends log messages to a file named {prefix}.{date}.{suffix} in a configured directory, with an optional preceding timestamp.

バージョン:
$Revision: 1.3.2.2 $ $Date: 2002/02/20 15:55:44 $
作成者:
Craig R. McClanahan

フィールドの概要
protected static java.lang.String info
          The descriptive information about this implementation.
protected  LifecycleSupport lifecycle
          The lifecycle event support for this component.
 
クラス org.apache.catalina.logger.LoggerBase から継承したフィールド
container, support, verbosity
 
インタフェース org.apache.catalina.Lifecycle から継承したフィールド
START_EVENT, STOP_EVENT
 
インタフェース org.apache.catalina.Logger から継承したフィールド
DEBUG, ERROR, FATAL, INFORMATION, WARNING
 
コンストラクタの概要
FileLogger()
           
 
メソッドの概要
 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.
 
クラス org.apache.catalina.logger.LoggerBase から継承したメソッド
addPropertyChangeListener, getContainer, getInfo, getVerbosity, log, log, log, log, removePropertyChangeListener, setContainer, setVerbosity, setVerbosityLevel
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

info

protected static final java.lang.String info
The descriptive information about this implementation.

lifecycle

protected LifecycleSupport lifecycle
The lifecycle event support for this component.
コンストラクタの詳細

FileLogger

public FileLogger()
メソッドの詳細

getDirectory

public java.lang.String getDirectory()
Return the directory in which we create log files.

setDirectory

public void setDirectory(java.lang.String directory)
Set the directory in which we create log files.
パラメータ:
directory - The new log file directory

getPrefix

public java.lang.String getPrefix()
Return the log file prefix.

setPrefix

public void setPrefix(java.lang.String prefix)
Set the log file prefix.
パラメータ:
prefix - The new log file prefix

getSuffix

public java.lang.String getSuffix()
Return the log file suffix.

setSuffix

public void setSuffix(java.lang.String suffix)
Set the log file suffix.
パラメータ:
suffix - The new log file suffix

getTimestamp

public boolean getTimestamp()
Return the timestamp flag.

setTimestamp

public void setTimestamp(boolean timestamp)
Set the timestamp flag.
パラメータ:
timestamp - The new timestamp flag

log

public void log(java.lang.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.
オーバーライド:
クラス LoggerBase 内の log
パラメータ:
msg - A String specifying the message to be written to the log file

addLifecycleListener

public void addLifecycleListener(LifecycleListener listener)
Add a lifecycle event listener to this component.
定義:
インタフェース Lifecycle 内の addLifecycleListener
パラメータ:
listener - The listener to add

removeLifecycleListener

public void removeLifecycleListener(LifecycleListener listener)
Remove a lifecycle event listener from this component.
定義:
インタフェース Lifecycle 内の removeLifecycleListener
パラメータ:
listener - The listener to add

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.
定義:
インタフェース Lifecycle 内の start
例外:
java.lang.IllegalStateException - if this component has already been started
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.
定義:
インタフェース Lifecycle 内の stop
例外:
java.lang.IllegalStateException - if this component has not been started
LifecycleException - if this component detects a fatal error that needs to be reported


Copyright ? 2000-2001 Apache Software Foundation. All Rights Reserved.