|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.util.jcache.CacheLogger
public abstract class CacheLogger
Applications can either extend this class to implement a customized logging mechanism. The caching service uses this API to log cache related events. Users can use the Cache.setLogSeverity(int) to change the desirable cache logging severity. The severity levels are defined as: OFF FATAL ERROR DEFAULT WARNING TRACE INFO DEBUG A default cache logger is implemented. If no cache logger is provided, the default cache logger will be used. By default, DefaultCacheLogger will log all the messages to a file called "jcache.log" in the directory where the server process is started. Users can set a differen log file name for the default logger when initializing the cache by calling CacheAttributes.setLogFileName(String).
Field Summary | |
---|---|
static int |
DEBUG
Deprecated. an int describing that debugmessages and higher should be logged. |
static int |
DEFAULT
Deprecated. an int describing that default logging severity is applied. |
static int |
ERROR
Deprecated. an int describing that only errors or higher should be logged. |
static int |
FATAL
Deprecated. an int describing that only fatal errors should be logged. |
static int |
INFO
Deprecated. an int describing that informational messages and higher should be logged. |
static int |
OFF
Deprecated. an int describing that the logging is off. |
static int |
TRACE
Deprecated. an int describing that tracing messages and higher should be logged. |
static int |
WARNING
Deprecated. an int describing that only warnings or higher should be logged. |
Constructor Summary | |
---|---|
protected |
CacheLogger()
Deprecated. Creates new CacheLogger. |
Method Summary | |
---|---|
abstract void |
flush()
Deprecated. log messages are buffered by the cache. |
static int |
getSeverity()
Deprecated. returns the current severity level defined in this class. |
abstract void |
init(String fileName,
int severity)
Deprecated. is called by the caching system when the CacheLogger is instanciated to complete any initialization requirements. |
abstract void |
log(String message)
Deprecated. application writers can implement this method and provide their own mechanism to log a message. |
abstract void |
log(String message,
Throwable cause)
Deprecated. application writers can implement this method and provide their own mechanism to log a message. |
void |
setSeverity(int severity)
Deprecated. sets the severity level to the specified level. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int OFF
public static final int FATAL
public static final int ERROR
public static final int WARNING
public static final int INFO
public static final int DEFAULT
public static final int DEBUG
public static final int TRACE
Constructor Detail |
---|
protected CacheLogger()
Method Detail |
---|
public abstract void log(String message)
message
- the message to log.public abstract void log(String message, Throwable cause)
message
- The message to log.cause
- The Exception responsible for causing an log event to
happen.public abstract void init(String fileName, int severity)
fileName
- the value from the CacheAttributeseverity
- the value from the CacheAttributes.public abstract void flush()
public static int getSeverity()
public final void setSeverity(int severity)
severity
- the severity level to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |