|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.iplanet.jato.Log
A simple logging mechanism that provides threadsafe static access to
the ServletContext.log(...)
method. The methods in this
class may be used from any object ultimately invoked in a request to
a JATO servlet. This class may not be used outside of a servlet
request.
Field Summary | |
static int |
ALL_LOG_LEVELS
All log levels |
static int |
ANY_DEBUG
Any debug log levels (includes VERBOSE_DEBUG & TERSE_DEBUG) |
static int |
ANY_ERROR
All error levels (includes WARNING, ERROR, & CRITICAL) |
static int |
ANY_TRACE
Any tracing log level (includes JATO_TRACE & APP_TRACE) |
static int |
ANY_USER_LEVEL
All user-defined log levels (includes USER_LEVEL_1, USER_LEVEL_2, & USER_LEVEL_3 |
static int |
APP_TRACE
Application tracing log level (for developer use) |
static int |
CRITICAL
Critical error log level (for developer use) |
static int |
DEFAULT_LOG_LEVELS
Default log levels (includes STANDARD & ANY_ERROR) |
static int |
ENABLED_LOG_LEVELS
The currently enabled log levels. |
static int |
ERROR
Fatal error log level (for developer use) |
static int |
JATO_TRACE
Reserved for internal JATO tracing |
static int |
STANDARD
Standard log level (same as STD) |
static int |
STD
Standard log level (same as STANDARD) |
static int |
TERSE_DEBUG
Terse debug log level (for developer use) |
static int |
USER_LEVEL_1
User-defined log level 1 |
static int |
USER_LEVEL_2
User-defined log level 2 |
static int |
USER_LEVEL_3
User-defined log level 3 |
static int |
VERBOSE_DEBUG
Verbose debug log level (for developer use) |
static int |
WARNING
Non-fatal warning log level (for developer use) |
Method Summary | |
static boolean |
getEchoToSystemOut()
Returns the state of logging to System.out in addition
to the servlet context |
static int |
getEnabledLevels()
Returns the currently enabled log level bitmask |
static java.lang.String |
getMessagePrefix()
Returns the message prefix used for messages logged through this class (to make them stand out better). |
protected static javax.servlet.ServletContext |
getServletContext()
Returns the servlet context registered with the current thread |
static boolean |
isLevelEnabled(int level)
Returns whether the specified log level is currently enabled |
static void |
log(int level,
java.lang.Object message)
Write a message to the servlet context log at the specified log level. |
static void |
log(int level,
java.lang.String message)
Write a message to the servlet context log at the specified log level. |
static void |
log(java.lang.Object message)
Write a message to the servlet context log. |
static void |
log(java.lang.String message)
Write a message to the servlet context log. |
static void |
log(java.lang.String message,
java.lang.Throwable exception)
Write an error message and exception to the servlet context log. |
static void |
setEchoToSystemOut(boolean value)
Sets the state of logging to System.out in addition
to the servlet context |
static void |
setEnabledLevels(int level)
Sets the currently enabled log level bitmask |
static void |
setMessagePrefix(java.lang.String value)
Sets the message prefix used for messages logged through this class (to make them stand out better). |
protected static void |
setServletContext(javax.servlet.ServletContext context)
Registers the specified servlet context with the current thread. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int STD
public static final int STANDARD
public static final int VERBOSE_DEBUG
public static final int TERSE_DEBUG
public static final int ANY_DEBUG
public static final int JATO_TRACE
public static final int APP_TRACE
public static final int ANY_TRACE
public static final int WARNING
public static final int ERROR
public static final int CRITICAL
public static final int ANY_ERROR
public static final int USER_LEVEL_1
public static final int USER_LEVEL_2
public static final int USER_LEVEL_3
public static final int ANY_USER_LEVEL
public static final int ALL_LOG_LEVELS
public static final int DEFAULT_LOG_LEVELS
public static int ENABLED_LOG_LEVELS
Method Detail |
protected static javax.servlet.ServletContext getServletContext()
protected static void setServletContext(javax.servlet.ServletContext context)
ApplicationServletBase
during initialization of a request.public static boolean getEchoToSystemOut()
System.out
in addition
to the servlet contextpublic static void setEchoToSystemOut(boolean value)
System.out
in addition
to the servlet contextpublic static java.lang.String getMessagePrefix()
public static void setMessagePrefix(java.lang.String value)
value
- The message prefix. The default is "--- ".public static void log(java.lang.Object message)
message
- The object to convert to a string and write to the context logpublic static void log(java.lang.String message)
message
- The message to write to the context logpublic static void log(int level, java.lang.Object message)
level
- The log level of the messagemessage
- The object to convert to a string and write to the context logpublic static void log(int level, java.lang.String message)
level
- The log level of the messagemessage
- The message to write to the context logpublic static void log(java.lang.String message, java.lang.Throwable exception)
message
- The error message to write to the context logexception
- The exception to write to the context logpublic static int getEnabledLevels()
public static void setEnabledLevels(int level)
public static boolean isLevelEnabled(int level)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |