|
Oracle Application Server Java Object Cache API Reference 10g Release 2 (10.1.2) B14018-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.ias.cache.CacheLogger
oracle.ias.cache.DefaultCacheLogger
DefaultCacheLogger extends CacheLogger abstract class and provides a default logging implementation. If no logger is passed in Cache.init(CacheAttributes), the DefaultCacheLogger will be used. By default, the DefaultCacheLogger will log the cache logging messages to a file called "javacache.log" in the directory where the server process is started. If a user wishes to log the message to a different file, the user can either instantiate a DefaultCacheLogger and pass in a logging file name in the constructor, or set the defaultLogFileName in the CacheAttributes when the cache is initialized.
By default, DefaultCacheLogger will set logging severity to DEFAULT, which will only log FATAL and ERROR cache messages. User can change the severity by either calling static method Cache.setLogSeverity(int), or call the setSeverity(int) on the logger object.
Field Summary |
Fields inherited from class oracle.ias.cache.CacheLogger |
DEBUG, DEFAULT, ERROR, FATAL, INFO, logFileName, OFF, severity, TRACE, WARNING |
Constructor Summary | |
DefaultCacheLogger() |
|
DefaultCacheLogger(int sev) Creates a new DefaultCacheLogger with logging severity set to sev. |
|
DefaultCacheLogger(int sev, java.lang.String filename) Creates a new DefaultCacheLogger with the logging severity set to sev, and the filename will be used as the log file instead of the default log file. |
Method Summary | |
void |
finalize() let the garbage collection thread releases resources. |
void |
flush() flush method writes out the messages to the log file, and clear the logging buffer. |
void |
init(java.lang.String filename, int sev) is called by the cache when the logging system is initialized. |
void |
log(java.lang.String message) logs a message to the specified log file. |
void |
log(java.lang.String message, java.lang.Throwable cause) logs a message and the exception stack to the specified log file. |
void |
setSeverity(int sev) changes the severity level defined as severity in this class. |
void |
setShowThreadId(boolean show) |
void |
setShowTimeStamp(boolean show) |
Methods inherited from class oracle.ias.cache.CacheLogger |
getLogFileName, getSeverity, parseLogSeverity, severityToString, shouldLog |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultCacheLogger(int sev) throws CacheException
sev
- the logging severity passed to caching systempublic DefaultCacheLogger(int sev, java.lang.String filename) throws CacheException
sev
- the logging severity passed to caching systemfilename
- absolute path to the desired log file.public DefaultCacheLogger() throws CacheException
Method Detail |
public void init(java.lang.String filename, int sev) throws CacheException
CacheLogger
init
in class CacheLogger
filename
- The name of the file to log tosev
- The initial logging severityCacheException
public void finalize()
public void log(java.lang.String message)
log
in class CacheLogger
message
- the message to be logged.public void log(java.lang.String message, java.lang.Throwable cause)
log
in class CacheLogger
message
- the message to be logged.cause
- usually it is the exception need to be logged.public void setShowTimeStamp(boolean show)
public void setShowThreadId(boolean show)
public void flush()
flush
in class CacheLogger
public void setSeverity(int sev)
CacheLogger
setSeverity
in class CacheLogger
sev
- the logging severity
|
Oracle Application Server Java Object Cache API Reference 10g Release 2 (10.1.2) B14018-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |