EAF 7.3 Implementation

org.apache.catalina.logger
Class TomcatMonologFileLogger

java.lang.Object
  extended by org.apache.catalina.logger.LoggerBase
      extended by org.apache.catalina.logger.TomcatMonologFileLogger
All Implemented Interfaces:
javax.management.MBeanRegistration, org.apache.catalina.Lifecycle, org.apache.catalina.Logger

public class TomcatMonologFileLogger
extends org.apache.catalina.logger.LoggerBase

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

Version:
$Revision: v1.0
Author:
Igor Smirnov

Field Summary
protected static java.lang.String info
          The descriptive information about this implementation.
static java.lang.String PROPERTY_FILE
           
 
Fields inherited from class org.apache.catalina.logger.LoggerBase
container, controller, debug, domain, host, lifecycle, mserver, oname, path, support, verbosity
 
Fields inherited from interface org.apache.catalina.Lifecycle
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, START_EVENT, STOP_EVENT
 
Fields inherited from interface org.apache.catalina.Logger
DEBUG, ERROR, FATAL, INFORMATION, WARNING
 
Constructor Summary
TomcatMonologFileLogger()
           
 
Method Summary
 void configure()
           
 void configure(com.lutris.util.Config logConfig)
          Configure Logger with given config section
 void configure(java.lang.String monologConfFile)
           
 void log(java.lang.String msg)
          Writes the specified message to a servlet log file, usually an event log.
 void start()
           
 void stop()
          Gracefully terminate the active use of the public methods of this component.
 
Methods inherited from class org.apache.catalina.logger.LoggerBase
addLifecycleListener, addPropertyChangeListener, createObjectName, destroy, findLifecycleListeners, getContainer, getController, getDebug, getDomain, getInfo, getObjectName, getVerbosity, init, log, log, log, log, postDeregister, postRegister, preDeregister, preRegister, removeLifecycleListener, removePropertyChangeListener, setContainer, setController, setDebug, setVerbosity, setVerbosityLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_FILE

public static java.lang.String PROPERTY_FILE

info

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

See Also:
Constant Field Values
Constructor Detail

TomcatMonologFileLogger

public TomcatMonologFileLogger()
                        throws com.lutris.util.ConfigException
Throws:
com.lutris.util.ConfigException
Method Detail

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.

Specified by:
log in interface org.apache.catalina.Logger
Overrides:
log in class org.apache.catalina.logger.LoggerBase
Parameters:
msg - A String specifying the message to be written to the log file

configure

public void configure(java.lang.String monologConfFile)
               throws com.lutris.util.ConfigException
Throws:
com.lutris.util.ConfigException

configure

public void configure()
               throws com.lutris.util.ConfigException
Throws:
com.lutris.util.ConfigException

configure

public void configure(com.lutris.util.Config logConfig)
               throws com.lutris.util.ConfigException
Configure Logger with given config section

Parameters:
logConfig - containing parameters for configuring logger
Throws:
com.lutris.util.ConfigException

start

public void start()
           throws org.apache.catalina.LifecycleException
Specified by:
start in interface org.apache.catalina.Lifecycle
Overrides:
start in class org.apache.catalina.logger.LoggerBase
Throws:
org.apache.catalina.LifecycleException

stop

public void stop()
          throws org.apache.catalina.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.

Specified by:
stop in interface org.apache.catalina.Lifecycle
Overrides:
stop in class org.apache.catalina.logger.LoggerBase
Throws:
org.apache.catalina.LifecycleException - if this component detects a fatal error that needs to be reported

EAF 7.3 Implementation