|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
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 EclipseLink to log generated messages and SQL. An implementor of this interface can be passed to the EclipseLink 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.
This class defines Eclipselink logging levels (that are used throughout EclipseLink code) with the following integer values:
ALL | = 0 | ||
FINEST | = 1 | ||
FINER | = 2 | ||
FINE | = 3 | ||
CONFIG | = 4 | ||
INFO | = 5 | ||
WARNING | = 6 | ||
SEVERE | = 7 | ||
OFF | = 8 |
In addition, EclipseLink categories used for logging name space are defined with the following String values:
AbstractSessionLog
,
SessionLogEntry
,
Session
Field Summary | |
---|---|
static int |
ALL
|
static java.lang.String |
ALL_LABEL
|
static java.lang.String |
CACHE
|
static int |
CONFIG
|
static java.lang.String |
CONFIG_LABEL
|
static java.lang.String |
CONNECTION
|
static java.lang.String |
DDL
|
static java.lang.String |
DMS
|
static java.lang.String |
EJB
|
static java.lang.String |
EJB_OR_METADATA
Deprecated. use METADATA |
static java.lang.String |
EVENT
|
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 |
JPA
|
static java.lang.String |
JPARS
|
static java.lang.String[] |
loggerCatagories
|
static java.lang.String |
METADATA
|
static java.lang.String |
METAMODEL
|
static int |
OFF
|
static java.lang.String |
OFF_LABEL
|
static java.lang.String |
PROPAGATION
|
static java.lang.String |
PROPERTIES
|
static java.lang.String |
QUERY
|
static java.lang.String |
SEQUENCING
|
static java.lang.String |
SERVER
|
static int |
SEVERE
|
static java.lang.String |
SEVERE_LABEL
|
static java.lang.String |
SQL
|
static java.lang.String |
TRANSACTION
|
static int |
WARNING
|
static java.lang.String |
WARNING_LABEL
|
static java.lang.String |
WEAVER
|
Method Summary | |
---|---|
java.lang.Object |
clone()
PUBLIC: Clone the log. |
void |
config(java.lang.String message)
PUBLIC: This method is called when a config level message needs to be logged. |
void |
fine(java.lang.String message)
PUBLIC: This method is called when a fine level message needs to be logged. |
void |
finer(java.lang.String message)
PUBLIC: This method is called when a finer level message needs to be logged. |
void |
finest(java.lang.String message)
PUBLIC: This method is called when a finest level message needs to be logged. |
int |
getLevel()
PUBLIC: Return the log level. |
int |
getLevel(java.lang.String category)
PUBLIC: Return the log level; category is only needed where name space is available. |
java.lang.String |
getLevelString()
PUBLIC: Return the log level as a string value. |
Session |
getSession()
PUBLIC: Get the session that owns this SessionLog. |
java.io.Writer |
getWriter()
PUBLIC: Return the writer to which an accessor writes logged messages and SQL. |
void |
info(java.lang.String message)
PUBLIC: This method is called when a info level message needs to be logged. |
void |
log(int level,
java.lang.String message)
PUBLIC: Log a message that does not need to be translated. |
void |
log(int level,
java.lang.String message,
java.lang.Object param)
PUBLIC: Log a message with one parameter that needs to be translated. |
void |
log(int level,
java.lang.String message,
java.lang.Object[] arguments)
PUBLIC: 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)
PUBLIC: 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)
PUBLIC: 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)
PUBLIC: Log a message with three 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,
java.lang.Object param4)
PUBLIC: Log a message with four parameters that needs to be translated. |
void |
log(int level,
java.lang.String category,
java.lang.String message,
java.lang.Object param)
PUBLIC: Log a message with one parameter that needs to be translated. |
void |
log(int level,
java.lang.String category,
java.lang.String message,
java.lang.Object[] arguments)
PUBLIC: This method is called when the log request is from somewhere session is not available. |
void |
log(int level,
java.lang.String category,
java.lang.String message,
java.lang.Object[] arguments,
boolean shouldTranslate)
PUBLIC: This method is called when the log request is from somewhere session is not available. |
void |
log(int level,
java.lang.String category,
java.lang.String message,
java.lang.Object param1,
java.lang.Object param2)
PUBLIC: Log a message with two parameters that needs to be translated. |
void |
log(int level,
java.lang.String category,
java.lang.String message,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3)
PUBLIC: Log a message with three parameters that needs to be translated. |
void |
log(int level,
java.lang.String category,
java.lang.String message,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3,
java.lang.Object param4)
PUBLIC: Log a message with four parameters that needs to be translated. |
void |
log(SessionLogEntry entry)
PUBLIC: EclipseLink will call this method whenever something needs to be logged (messages, SQL, etc.). |
void |
logThrowable(int level,
java.lang.String category,
java.lang.Throwable throwable)
PUBLIC: Log a throwable with level. |
void |
logThrowable(int level,
java.lang.Throwable throwable)
PUBLIC: Log a Throwable with level. |
void |
setLevel(int level)
PUBLIC: Set the log level. |
void |
setLevel(int level,
java.lang.String category)
PUBLIC: Set the log level. |
void |
setSession(Session session)
PUBLIC: Set the session that owns this SessionLog. |
void |
setShouldDisplayData(java.lang.Boolean shouldDisplayData)
Set whether bind parameters should be displayed when logging SQL. |
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)
PUBLIC: Set the writer to which an accessor writes logged messages and SQL. |
void |
severe(java.lang.String message)
PUBLIC: This method is called when a severe level message needs to be logged. |
boolean |
shouldDisplayData()
Return whether bind parameters should be displayed when logging SQL, default is true. |
boolean |
shouldLog(int level)
PUBLIC: Check if a message of the given level would actually be logged. |
boolean |
shouldLog(int level,
java.lang.String category)
PUBLIC: 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)
PUBLIC: This method is called when a throwable at finer level needs to be logged. |
void |
warning(java.lang.String message)
PUBLIC: This method is called when a warning level message needs to be logged. |
Field Detail |
---|
static final int OFF
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
static final java.lang.String SQL
static final java.lang.String TRANSACTION
static final java.lang.String EVENT
static final java.lang.String CONNECTION
static final java.lang.String QUERY
static final java.lang.String CACHE
static final java.lang.String PROPAGATION
static final java.lang.String SEQUENCING
static final java.lang.String JPA
static final java.lang.String EJB
static final java.lang.String DMS
static final java.lang.String METADATA
@Deprecated static final java.lang.String EJB_OR_METADATA
METADATA
static final java.lang.String METAMODEL
static final java.lang.String WEAVER
static final java.lang.String PROPERTIES
static final java.lang.String SERVER
static final java.lang.String DDL
static final java.lang.String JPARS
static final java.lang.String[] loggerCatagories
Method Detail |
---|
void log(SessionLogEntry entry)
entry
- org.eclipse.persistence.sessions.LogEntryboolean shouldLogExceptionStackTrace()
boolean shouldPrintDate()
boolean shouldPrintThread()
boolean shouldDisplayData()
boolean shouldPrintConnection()
boolean shouldPrintSession()
void setShouldDisplayData(java.lang.Boolean shouldDisplayData)
void setShouldLogExceptionStackTrace(boolean flag)
void setShouldPrintDate(boolean flag)
void setShouldPrintThread(boolean flag)
void setShouldPrintConnection(boolean flag)
void setShouldPrintSession(boolean flag)
java.io.Writer getWriter()
void setWriter(java.io.Writer log)
int getLevel()
The EclipseLink logging levels returned correspond to:
ALL | = 0 | |
FINEST | = 1 | |
FINER | = 2 | |
FINE | = 3 | |
CONFIG | = 4 | |
INFO | = 5 | |
WARNING | = 6 | |
SEVERE | = 7 | |
OFF | = 8 |
java.lang.String getLevelString()
Return the log level as a string value.
int getLevel(java.lang.String category)
The EclipseLink logging levels returned correspond to:
ALL | = 0 | |
FINEST | = 1 | |
FINER | = 2 | |
FINE | = 3 | |
CONFIG | = 4 | |
INFO | = 5 | |
WARNING | = 6 | |
SEVERE | = 7 | |
OFF | = 8 |
The EclipseLink categories for the logging name space are:
SQL | = "sql" | ||
TRANSACTION | = "transaction" | ||
EVENT | = "event" | ||
CONNECTION | = "connection" | ||
QUERY | = "query" | ||
CACHE | = "cache" | ||
PROPAGATION | = "propagation" | ||
SEQUENCING | = "sequencing" | ||
EJB | = "ejb" | ||
DMS | = "dms" | ||
EJB_OR_METADATA | = "ejb_or_metadata" | ||
METAMODEL | = "metamodel" | ||
WEAVER | = "weaver" | ||
PROPERTIES | = "properties" | ||
SERVER | = "server" |
void setLevel(int level)
The EclipseLink logging levels available are:
ALL | = 0 | |
FINEST | = 1 | |
FINER | = 2 | |
FINE | = 3 | |
CONFIG | = 4 | |
INFO | = 5 | |
WARNING | = 6 | |
SEVERE | = 7 | |
OFF | = 8 |
void setLevel(int level, java.lang.String category)
The EclipseLink logging levels available are:
ALL | = 0 | |
FINEST | = 1 | |
FINER | = 2 | |
FINE | = 3 | |
CONFIG | = 4 | |
INFO | = 5 | |
WARNING | = 6 | |
SEVERE | = 7 | |
OFF | = 8 |
The EclipseLink categories for logging name space are:
SQL | = "sql" | ||
TRANSACTION | = "transaction" | ||
EVENT | = "event" | ||
CONNECTION | = "connection" | ||
QUERY | = "query" | ||
CACHE | = "cache" | ||
PROPAGATION | = "propagation" | ||
SEQUENCING | = "sequencing" | ||
EJB | = "ejb" | ||
DMS | = "dms" | ||
EJB_OR_METADATA | = "ejb_or_metadata" | ||
METAMODEL | = "metamodel" | ||
WEAVER | = "weaver" | ||
PROPERTIES | = "properties" | ||
SERVER | = "server" |
boolean shouldLog(int level)
The EclipseLink logging levels available are:
ALL | = 0 | |
FINEST | = 1 | |
FINER | = 2 | |
FINE | = 3 | |
CONFIG | = 4 | |
INFO | = 5 | |
WARNING | = 6 | |
SEVERE | = 7 | |
OFF | = 8 |
boolean shouldLog(int level, java.lang.String category)
The EclipseLink logging levels available are:
ALL | = 0 | |
FINEST | = 1 | |
FINER | = 2 | |
FINE | = 3 | |
CONFIG | = 4 | |
INFO | = 5 | |
WARNING | = 6 | |
SEVERE | = 7 | |
OFF | = 8 |
The EclipseLink categories for logging name space are:
SQL | = "sql" | ||
TRANSACTION | = "transaction" | ||
EVENT | = "event" | ||
CONNECTION | = "connection" | ||
QUERY | = "query" | ||
CACHE | = "cache" | ||
PROPAGATION | = "propagation" | ||
SEQUENCING | = "sequencing" | ||
EJB | = "ejb" | ||
DMS | = "dms" | ||
EJB_OR_METADATA | = "ejb_or_metadata" | ||
METAMODEL | = "metamodel" | ||
WEAVER | = "weaver" | ||
PROPERTIES | = "properties" | ||
SERVER | = "server" |
void log(int level, java.lang.String message)
The EclipseLink logging levels available are:
ALL | = 0 | |
FINEST | = 1 | |
FINER | = 2 | |
FINE | = 3 | |
CONFIG | = 4 | |
INFO | = 5 | |
WARNING | = 6 | |
SEVERE | = 7 | |
OFF | = 8 |
void log(int level, java.lang.String message, java.lang.Object param)
The EclipseLink logging levels available are:
ALL | = 0 | |
FINEST | = 1 | |
FINER | = 2 | |
FINE | = 3 | |
CONFIG | = 4 | |
INFO | = 5 | |
WARNING | = 6 | |
SEVERE | = 7 | |
OFF | = 8 |
void log(int level, java.lang.String category, java.lang.String message, java.lang.Object param)
The EclipseLink logging levels available are:
ALL | = 0 | |
FINEST | = 1 | |
FINER | = 2 | |
FINE | = 3 | |
CONFIG | = 4 | |
INFO | = 5 | |
WARNING | = 6 | |
SEVERE | = 7 | |
OFF | = 8 |
void log(int level, java.lang.String message, java.lang.Object param1, java.lang.Object param2)
The EclipseLink logging levels available are:
ALL | = 0 | |
FINEST | = 1 | |
FINER | = 2 | |
FINE | = 3 | |
CONFIG | = 4 | |
INFO | = 5 | |
WARNING | = 6 | |
SEVERE | = 7 | |
OFF | = 8 |
void log(int level, java.lang.String category, java.lang.String message, java.lang.Object param1, java.lang.Object param2)
The EclipseLink logging levels available are:
ALL | = 0 | |
FINEST | = 1 | |
FINER | = 2 | |
FINE | = 3 | |
CONFIG | = 4 | |
INFO | = 5 | |
WARNING | = 6 | |
SEVERE | = 7 | |
OFF | = 8 |
void log(int level, java.lang.String message, java.lang.Object param1, java.lang.Object param2, java.lang.Object param3)
The EclipseLink logging levels available are:
ALL | = 0 | |
FINEST | = 1 | |
FINER | = 2 | |
FINE | = 3 | |
CONFIG | = 4 | |
INFO | = 5 | |
WARNING | = 6 | |
SEVERE | = 7 | |
OFF | = 8 |
void log(int level, java.lang.String category, java.lang.String message, java.lang.Object param1, java.lang.Object param2, java.lang.Object param3)
The EclipseLink logging levels available are:
ALL | = 0 | |
FINEST | = 1 | |
FINER | = 2 | |
FINE | = 3 | |
CONFIG | = 4 | |
INFO | = 5 | |
WARNING | = 6 | |
SEVERE | = 7 | |
OFF | = 8 |
void log(int level, java.lang.String message, java.lang.Object param1, java.lang.Object param2, java.lang.Object param3, java.lang.Object param4)
The EclipseLink logging levels available are:
ALL | = 0 | |
FINEST | = 1 | |
FINER | = 2 | |
FINE | = 3 | |
CONFIG | = 4 | |
INFO | = 5 | |
WARNING | = 6 | |
SEVERE | = 7 | |
OFF | = 8 |
void log(int level, java.lang.String category, java.lang.String message, java.lang.Object param1, java.lang.Object param2, java.lang.Object param3, java.lang.Object param4)
The EclipseLink logging levels available are:
ALL | = 0 | |
FINEST | = 1 | |
FINER | = 2 | |
FINE | = 3 | |
CONFIG | = 4 | |
INFO | = 5 | |
WARNING | = 6 | |
SEVERE | = 7 | |
OFF | = 8 |
void log(int level, java.lang.String message, java.lang.Object[] arguments)
The EclipseLink logging levels available are:
ALL | = 0 | |
FINEST | = 1 | |
FINER | = 2 | |
FINE | = 3 | |
CONFIG | = 4 | |
INFO | = 5 | |
WARNING | = 6 | |
SEVERE | = 7 | |
OFF | = 8 |
void log(int level, java.lang.String category, java.lang.String message, java.lang.Object[] arguments)
The EclipseLink logging levels available are:
ALL | = 0 | |
FINEST | = 1 | |
FINER | = 2 | |
FINE | = 3 | |
CONFIG | = 4 | |
INFO | = 5 | |
WARNING | = 6 | |
SEVERE | = 7 | |
OFF | = 8 |
void log(int level, java.lang.String message, java.lang.Object[] arguments, boolean shouldTranslate)
The EclipseLink logging levels available are:
ALL | = 0 | |
FINEST | = 1 | |
FINER | = 2 | |
FINE | = 3 | |
CONFIG | = 4 | |
INFO | = 5 | |
WARNING | = 6 | |
SEVERE | = 7 | |
OFF | = 8 |
void log(int level, java.lang.String category, java.lang.String message, java.lang.Object[] arguments, boolean shouldTranslate)
The EclipseLink logging levels available are:
ALL | = 0 | |
FINEST | = 1 | |
FINER | = 2 | |
FINE | = 3 | |
CONFIG | = 4 | |
INFO | = 5 | |
WARNING | = 6 | |
SEVERE | = 7 | |
OFF | = 8 |
void throwing(java.lang.Throwable throwable)
void severe(java.lang.String message)
void warning(java.lang.String message)
void info(java.lang.String message)
void config(java.lang.String message)
void fine(java.lang.String message)
void finer(java.lang.String message)
void finest(java.lang.String message)
void logThrowable(int level, java.lang.Throwable throwable)
Throwable
with level.
The EclipseLink logging levels available are:
ALL | = 0 | |
FINEST | = 1 | |
FINER | = 2 | |
FINE | = 3 | |
CONFIG | = 4 | |
INFO | = 5 | |
WARNING | = 6 | |
SEVERE | = 7 | |
OFF | = 8 |
void logThrowable(int level, java.lang.String category, java.lang.Throwable throwable)
The EclipseLink logging levels available are:
ALL | = 0 | |
FINEST | = 1 | |
FINER | = 2 | |
FINE | = 3 | |
CONFIG | = 4 | |
INFO | = 5 | |
WARNING | = 6 | |
SEVERE | = 7 | |
OFF | = 8 |
Session getSession()
void setSession(Session session)
java.lang.Object clone()
|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |