|
Oracle Fusion Middleware Java API Reference for Oracle TopLink 11g Release 1 (11.1.1) B32476-02 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface SessionLog
SessionLog is the ever-so-simple interface used by TopLink to log generated messages and SQL. An implementor of this interface can be passed to the TopLink session (via the #setSessionLog(SessionLog) method); and all logging data will be passed through to the implementor via an instance of SessionLogEntry. This can be used to supplement debugging; or the entries could be stored in a database instead of logged to System.out; etc.
AbstractSessionLog, SessionLogEntry, Session| Field Summary | |
|---|---|
static int |
ALL |
static java.lang.String |
ALL_LABEL |
static int |
CONFIG |
static java.lang.String |
CONFIG_LABEL |
static int |
FINE |
static java.lang.String |
FINE_LABEL |
static int |
FINER |
static java.lang.String |
FINER_LABEL |
static int |
FINEST |
static java.lang.String |
FINEST_LABEL |
static int |
INFO |
static java.lang.String |
INFO_LABEL |
static java.lang.String |
OFF_LABEL |
static int |
SEVERE |
static java.lang.String |
SEVERE_LABEL |
static int |
WARNING |
static java.lang.String |
WARNING_LABEL |
| Fields inherited from interface oracle.toplink.sessions.SessionLog |
|---|
CACHE, CONNECTION, DMS, EJB, EJB_OR_METADATA, EVENT, loggerCatagories, OFF, PROPAGATION, PROPERTIES, QUERY, SEQUENCING, SERVER, SQL, TRANSACTION, WEAVER |
| Method Summary | |
|---|---|
java.lang.Object |
clone()Clone the log. |
void |
config(java.lang.String message)This method is called when a config level message needs to be logged. |
void |
fine(java.lang.String message)This method is called when a fine level message needs to be logged. |
void |
finer(java.lang.String message)This method is called when a finer level message needs to be logged. |
void |
finest(java.lang.String message)This method is called when a finest level message needs to be logged. |
int |
getLevel()Return the log level. |
int |
getLevel(java.lang.String category)Return the log level. |
Session |
getSession()Get the session that owns this SessionLog. |
java.io.Writer |
getWriter()Return the writer to which an accessor writes logged messages and SQL. |
void |
info(java.lang.String message)This method is called when a info level message needs to be logged. |
void |
log(int level, java.lang.String message)Log a message that does not need to be translated. |
void |
log(int level, java.lang.String message, java.lang.Object param)Log a message with one parameter that needs to be translated. |
void |
log(int level, java.lang.String message, java.lang.Object[] arguments)This method is called when the log request is from somewhere session is not available. |
void |
log(int level, java.lang.String message, java.lang.Object[] arguments, boolean shouldTranslate)This method is called when the log request is from somewhere session is not available. |
void |
log(int level, java.lang.String message, java.lang.Object param1, java.lang.Object param2)Log a message with two parameters that needs to be translated. |
void |
log(int level, java.lang.String message, java.lang.Object param1, java.lang.Object param2, java.lang.Object param3)Log a message with three parameters that needs to be translated. |
void |
log(SessionLogEntry entry)TopLink will call this method whenever something needs to be logged (messages, SQL, etc.). |
void |
logThrowable(int level, java.lang.Throwable throwable)Log a throwable with level. |
void |
setLevel(int level)Set the log level. |
void |
setLevel(int level, java.lang.String category)Set the log level. |
void |
setSession(Session session)Set the session that owns this SessionLog. |
void |
setShouldLogExceptionStackTrace(boolean flag)By default stack trace is logged for SEVERE all the time and at FINER level for WARNING or less. |
void |
setShouldPrintConnection(boolean flag)By default the connection is always printed whenever available, this can be turned off. |
void |
setShouldPrintDate(boolean flag)By default date is printed, this can be turned off. |
void |
setShouldPrintSession(boolean flag)By default the Session is always printed whenever available, this can be turned off. |
void |
setShouldPrintThread(boolean flag)By default the thread is logged at FINE or less level, this can be turned off. |
void |
setWriter(java.io.Writer log)Set the writer to which an accessor writes logged messages and SQL. |
void |
severe(java.lang.String message)This method is called when a severe level message needs to be logged. |
boolean |
shouldLog(int level)Check if a message of the given level would actually be logged. |
boolean |
shouldLog(int level, java.lang.String category)Check if a message of the given level would actually be logged. |
boolean |
shouldLogExceptionStackTrace()By default the stack trace is logged for SEVERE all the time and at FINER level for WARNING or less, this can be turned off. |
boolean |
shouldPrintConnection()By default the connection is always printed whenever available, this can be turned off. |
boolean |
shouldPrintDate()By default the date is always printed, this can be turned off. |
boolean |
shouldPrintSession()By default the Session is always printed whenever available, this can be turned off. |
boolean |
shouldPrintThread()By default the thread is logged at FINE or less level, this can be turned off. |
void |
throwing(java.lang.Throwable throwable)This method is called when a throwable at finer level needs to be logged. |
void |
warning(java.lang.String message)This method is called when a warning level message needs to be logged. |
| Methods inherited from interface oracle.toplink.sessions.SessionLog |
|---|
getLevelString, log, setShouldLogDebug, setShouldLogExceptions, shouldLogDebug, shouldLogExceptions |
| Field Detail |
|---|
static final java.lang.String OFF_LABEL
static final int SEVERE
static final java.lang.String SEVERE_LABEL
static final int WARNING
static final java.lang.String WARNING_LABEL
static final int INFO
static final java.lang.String INFO_LABEL
static final int CONFIG
static final java.lang.String CONFIG_LABEL
static final int FINE
static final java.lang.String FINE_LABEL
static final int FINER
static final java.lang.String FINER_LABEL
static final int FINEST
static final java.lang.String FINEST_LABEL
static final int ALL
static final java.lang.String ALL_LABEL
| Method Detail |
|---|
void log(SessionLogEntry entry)
log in interface SessionLogentry - oracle.toplink.sessions.LogEntryboolean shouldLogExceptionStackTrace()
shouldLogExceptionStackTrace in interface SessionLogboolean shouldPrintDate()
shouldPrintDate in interface SessionLogboolean shouldPrintThread()
shouldPrintThread in interface SessionLogboolean shouldPrintConnection()
shouldPrintConnection in interface SessionLogboolean shouldPrintSession()
shouldPrintSession in interface SessionLogvoid setShouldLogExceptionStackTrace(boolean flag)
setShouldLogExceptionStackTrace in interface SessionLogvoid setShouldPrintDate(boolean flag)
setShouldPrintDate in interface SessionLogvoid setShouldPrintThread(boolean flag)
setShouldPrintThread in interface SessionLogvoid setShouldPrintConnection(boolean flag)
setShouldPrintConnection in interface SessionLogvoid setShouldPrintSession(boolean flag)
setShouldPrintSession in interface SessionLogjava.io.Writer getWriter()
getWriter in interface SessionLogvoid setWriter(java.io.Writer log)
setWriter in interface SessionLogint getLevel()
getLevel in interface SessionLogint getLevel(java.lang.String category)
getLevel in interface SessionLogvoid setLevel(int level)
setLevel in interface SessionLog
void setLevel(int level,
java.lang.String category)
setLevel in interface SessionLogboolean shouldLog(int level)
shouldLog in interface SessionLog
boolean shouldLog(int level,
java.lang.String category)
shouldLog in interface SessionLog
void log(int level,
java.lang.String message)
log in interface SessionLog
void log(int level,
java.lang.String message,
java.lang.Object param)
log in interface SessionLog
void log(int level,
java.lang.String message,
java.lang.Object param1,
java.lang.Object param2)
log in interface SessionLog
void log(int level,
java.lang.String message,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3)
log in interface SessionLog
void log(int level,
java.lang.String message,
java.lang.Object[] arguments)
log in interface SessionLog
void log(int level,
java.lang.String message,
java.lang.Object[] arguments,
boolean shouldTranslate)
log in interface SessionLogvoid throwing(java.lang.Throwable throwable)
throwing in interface SessionLogvoid severe(java.lang.String message)
severe in interface SessionLogvoid warning(java.lang.String message)
warning in interface SessionLogvoid info(java.lang.String message)
info in interface SessionLogvoid config(java.lang.String message)
config in interface SessionLogvoid fine(java.lang.String message)
fine in interface SessionLogvoid finer(java.lang.String message)
finer in interface SessionLogvoid finest(java.lang.String message)
finest in interface SessionLog
void logThrowable(int level,
java.lang.Throwable throwable)
logThrowable in interface SessionLogSession getSession()
getSession in interface SessionLogvoid setSession(Session session)
setSession in interface SessionLogjava.lang.Object clone()
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||