|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.excalibur.logger.ServletLogger
Logger to bootstrap avalon application iside a servlet. Intended to be used as a logger for Fortress ContextManager/ContainerManager. Adapted from ConsoleLogger.
Field Summary | |
static int |
LEVEL_DEBUG
Typecode for debugging messages. |
static int |
LEVEL_DISABLED
Typecode for disabled log levels. |
static int |
LEVEL_ERROR
Typecode for error messages. |
static int |
LEVEL_FATAL
Typecode for fatal error messages. |
static int |
LEVEL_INFO
Typecode for informational messages. |
static int |
LEVEL_WARN
Typecode for warning messages. |
Constructor Summary | |
ServletLogger(javax.servlet.ServletConfig servletConfig)
Creates a new ServletLogger with the priority set to DEBUG. |
|
ServletLogger(javax.servlet.ServletConfig servletConfig,
int logLevel)
Creates a new ServletLogger. |
|
ServletLogger(javax.servlet.ServletContext servletContext,
java.lang.String prompt,
int logLevel)
Creates a new ServletLogger. |
Method Summary | |
void |
debug(java.lang.String message)
Logs a debugging message. |
void |
debug(java.lang.String message,
java.lang.Throwable throwable)
Logs a debugging message and an exception. |
void |
error(java.lang.String message)
Logs an error message. |
void |
error(java.lang.String message,
java.lang.Throwable throwable)
Logs an error message and an exception. |
void |
fatalError(java.lang.String message)
Logs a fatal error message. |
void |
fatalError(java.lang.String message,
java.lang.Throwable throwable)
Logs a fatal error message and an exception. |
Logger |
getChildLogger(java.lang.String name)
Just returns this logger ( ServletLogger is not hierarchical). |
void |
info(java.lang.String message)
Logs an informational message. |
void |
info(java.lang.String message,
java.lang.Throwable throwable)
Logs an informational message and an exception. |
boolean |
isDebugEnabled()
Returns true if debug-level logging is enabled, false otherwise. |
boolean |
isErrorEnabled()
Returns true if error-level logging is enabled, false otherwise. |
boolean |
isFatalErrorEnabled()
Returns true if fatal-level logging is enabled, false otherwise. |
boolean |
isInfoEnabled()
Returns true if info-level logging is enabled, false otherwise. |
boolean |
isWarnEnabled()
Returns true if warn-level logging is enabled, false otherwise. |
void |
warn(java.lang.String message)
Logs a warning message. |
void |
warn(java.lang.String message,
java.lang.Throwable throwable)
Logs a warning message and an exception. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int LEVEL_DEBUG
public static final int LEVEL_INFO
public static final int LEVEL_WARN
public static final int LEVEL_ERROR
public static final int LEVEL_FATAL
public static final int LEVEL_DISABLED
Constructor Detail |
public ServletLogger(javax.servlet.ServletConfig servletConfig)
public ServletLogger(javax.servlet.ServletContext servletContext, java.lang.String prompt, int logLevel)
servletContext
- ServletContext to log messages toprompt
- text to prepend to every messagelogLevel
- log level typecodepublic ServletLogger(javax.servlet.ServletConfig servletConfig, int logLevel)
servletConfig
- the servletConfig to extract ServletContext from;
also the servlet name is extracted to be prepended to every message.logLevel
- log level typecodeMethod Detail |
public void debug(java.lang.String message)
debug
in interface Logger
message
- a String
valuepublic void debug(java.lang.String message, java.lang.Throwable throwable)
debug
in interface Logger
message
- a String
valuethrowable
- a Throwable
valuepublic boolean isDebugEnabled()
true
if debug-level logging is enabled, false otherwise.
isDebugEnabled
in interface Logger
true
if debug-level loggingpublic void info(java.lang.String message)
info
in interface Logger
message
- a String
valuepublic void info(java.lang.String message, java.lang.Throwable throwable)
info
in interface Logger
message
- a String
valuethrowable
- a Throwable
valuepublic boolean isInfoEnabled()
true
if info-level logging is enabled, false otherwise.
isInfoEnabled
in interface Logger
true
if info-level logging is enabledpublic void warn(java.lang.String message)
warn
in interface Logger
message
- a String
valuepublic void warn(java.lang.String message, java.lang.Throwable throwable)
warn
in interface Logger
message
- a String
valuethrowable
- a Throwable
valuepublic boolean isWarnEnabled()
true
if warn-level logging is enabled, false otherwise.
isWarnEnabled
in interface Logger
true
if warn-level logging is enabledpublic void error(java.lang.String message)
error
in interface Logger
message
- a String
valuepublic void error(java.lang.String message, java.lang.Throwable throwable)
error
in interface Logger
message
- a String
valuethrowable
- a Throwable
valuepublic boolean isErrorEnabled()
true
if error-level logging is enabled, false otherwise.
isErrorEnabled
in interface Logger
true
if error-level logging is enabledpublic void fatalError(java.lang.String message)
fatalError
in interface Logger
message
- a String
valuepublic void fatalError(java.lang.String message, java.lang.Throwable throwable)
fatalError
in interface Logger
message
- a String
valuethrowable
- a Throwable
valuepublic boolean isFatalErrorEnabled()
true
if fatal-level logging is enabled, false otherwise.
isFatalErrorEnabled
in interface Logger
true
if fatal-level logging is enabledpublic Logger getChildLogger(java.lang.String name)
ServletLogger
is not hierarchical).
getChildLogger
in interface Logger
name
- ignored
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |