container
protected Container container
The Container with which this Logger has been associated.
controller
protected ObjectName controller
debug
protected int debug
The debugging detail level for this component.
domain
protected String domain
host
protected String host
info
protected static final String info
The descriptive information about this implementation.
lifecycle
protected LifecycleSupport lifecycle
The lifecycle event support for this component.
mserver
protected MBeanServer mserver
oname
protected ObjectName oname
path
protected String path
support
protected PropertyChangeSupport support
The property change support for this component.
verbosity
protected int verbosity
The verbosity level for above which log messages may be filtered.
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
Add a property change listener to this component.
- addPropertyChangeListener in interface Logger
listener
- The listener to add
createObjectName
public ObjectName createObjectName()
destroy
public void destroy()
findLifecycleListeners
public LifecycleListener[] findLifecycleListeners()
Get the lifecycle listeners associated with this lifecycle. If this
Lifecycle has no listeners registered, a zero-length array is returned.
- findLifecycleListeners in interface Lifecycle
getContainer
public Container getContainer()
Return the Container with which this Logger has been associated.
- getContainer in interface Logger
getController
public ObjectName getController()
getDebug
public int getDebug()
Return the debugging detail level for this component.
getDomain
public String getDomain()
getInfo
public String getInfo()
Return descriptive information about this Logger implementation and
the corresponding version number, in the format
<description>/<version>
.
- getInfo in interface Logger
getObjectName
public ObjectName getObjectName()
getVerbosity
public int getVerbosity()
Return the verbosity level of this logger. Messages logged with a
higher verbosity than this level will be silently ignored.
- getVerbosity in interface Logger
log
public void log(Exception exception,
String msg)
Writes the specified exception, and message, to a servlet log file.
The implementation of this method should call
log(msg, exception)
instead. This method is deprecated
in the ServletContext interface, but not deprecated here to avoid
many useless compiler warnings. This message will be logged
unconditionally.
- log in interface Logger
exception
- An Exception
to be reportedmsg
- The associated message string
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. This message will be logged unconditionally.
- log in interface Logger
msg
- A String
specifying the message to be
written to the log file
log
public void log(String msg,
Throwable throwable)
Writes an explanatory message and a stack trace for a given
Throwable
exception to the servlet log file. The name
and type of the servlet log file is specific to the servlet container,
usually an event log. This message will be logged unconditionally.
- log in interface Logger
msg
- A String
that describes the error or
exceptionthrowable
- The Throwable
error or exception
log
public void log(String message,
Throwable throwable,
int verbosity)
Writes the specified message and exception to the servlet log file,
usually an event log, if the logger is set to a verbosity level equal
to or higher than the specified value for this message.
- log in interface Logger
message
- A String
that describes the error or
exceptionthrowable
- The Throwable
error or exceptionverbosity
- Verbosity level of this message
log
public void log(String message,
int verbosity)
Writes the specified message to the servlet log file, usually an event
log, if the logger is set to a verbosity level equal to or higher than
the specified value for this message.
- log in interface Logger
message
- A String
specifying the message to be
written to the log fileverbosity
- Verbosity level of this message
postDeregister
public void postDeregister()
postRegister
public void postRegister(Boolean registrationDone)
preDeregister
public void preDeregister()
throws Exception
preRegister
public ObjectName preRegister(MBeanServer server,
ObjectName name)
throws Exception
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a property change listener from this component.
- removePropertyChangeListener in interface Logger
listener
- The listener to remove
setContainer
public void setContainer(Container container)
Set the Container with which this Logger has been associated.
- setContainer in interface Logger
container
- The associated Container
setController
public void setController(ObjectName controller)
setDebug
public void setDebug(int debug)
Set the debugging detail level for this component.
debug
- The new debugging detail level
setVerbosity
public void setVerbosity(int verbosity)
Set the verbosity level of this logger. Messages logged with a
higher verbosity than this level will be silently ignored.
- setVerbosity in interface Logger
verbosity
- The new verbosity level
setVerbosityLevel
public void setVerbosityLevel(String verbosity)
Set the verbosity level of this logger. Messages logged with a
higher verbosity than this level will be silently ignored.
verbosity
- The new verbosity level, as a string
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
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
LifecycleException
- if this component detects a fatal error
that needs to be reported