|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Logger
A Logger is a generic interface for the message and exception logging methods of the ServletContext interface. Loggers can be attached at any Container level, but will typically only be attached to a Context, or higher level, Container.
Field Summary | |
---|---|
static int |
DEBUG
|
static int |
ERROR
|
static int |
FATAL
Verbosity level constants for log messages that may be filtered by the underlying logger. |
static int |
INFORMATION
|
static int |
WARNING
|
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a property change listener to this component. |
Container |
getContainer()
Return the Container with which this Logger has been associated. |
java.lang.String |
getInfo()
Return descriptive information about this Logger implementation and the corresponding version number, in the format <description>/<version> . |
int |
getVerbosity()
Return the verbosity level of this logger. |
void |
log(java.lang.Exception exception,
java.lang.String msg)
Writes the specified exception, and message, to a servlet log file. |
void |
log(java.lang.String message)
Writes the specified message to a servlet log file, usually an event log. |
void |
log(java.lang.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. |
void |
log(java.lang.String message,
java.lang.Throwable throwable)
Writes an explanatory message and a stack trace for a given Throwable exception to the servlet log file. |
void |
log(java.lang.String message,
java.lang.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. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a property change listener from this component. |
void |
setContainer(Container container)
Set the Container with which this Logger has been associated. |
void |
setVerbosity(int verbosity)
Set the verbosity level of this logger. |
Field Detail |
---|
static final int FATAL
static final int ERROR
static final int WARNING
static final int INFORMATION
static final int DEBUG
Method Detail |
---|
Container getContainer()
void setContainer(Container container)
container
- The associated Containerjava.lang.String getInfo()
<description>/<version>
.
int getVerbosity()
void setVerbosity(int verbosity)
verbosity
- The new verbosity levelvoid addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The listener to addvoid log(java.lang.String message)
message
- A String
specifying the message to be
written to the log filevoid log(java.lang.Exception exception, java.lang.String msg)
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.
exception
- An Exception
to be reportedmsg
- The associated message stringvoid log(java.lang.String message, java.lang.Throwable throwable)
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.
message
- A String
that describes the error or
exceptionthrowable
- The Throwable
error or exceptionvoid log(java.lang.String message, int verbosity)
message
- A String
specifying the message to be
written to the log fileverbosity
- Verbosity level of this messagevoid log(java.lang.String message, java.lang.Throwable throwable, int verbosity)
message
- A String
that describes the error or
exceptionthrowable
- The Throwable
error or exceptionverbosity
- Verbosity level of this messagevoid removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The listener to remove
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |