- All Superinterfaces:
Cloneable
- All Known Implementing Classes:
AbstractSessionLog
,DefaultSessionLog
,JavaLog
,ServerLog
,SLF4JLogger
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:
CACHE | = "cache" | ||
CONNECTION | = "connection" | ||
DMS | = "dms" | ||
EJB | = "ejb" | ||
EVENT | = "event" | ||
DBWS | = "dbws" | ||
JPARS | = "jpars" | ||
METADATA | = "metadata" | ||
METAMODEL | = "metamodel" | ||
MOXY | = "moxy" | ||
PROCESSOR | = "processor" | ||
PROPAGATION | = "propagation" | ||
PROPERTIES | = "properties" | ||
QUERY | = "query" | ||
SEQUENCING | = "sequencing" | ||
SERVER | = "server" | ||
SQL | = "sql" | ||
THREAD | = "thread" | ||
TRANSACTION | = "transaction" | ||
WEAVER | = "weaver" |
- Since:
- TOPLink/Java 3.0
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final String
static final String
static final int
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final int
static final String
static final int
static final String
static final int
static final String
static final int
static final String
static final String
static final String
static final String[]
static final String
static final String
static final String
static final String
static final String
static final int
static final String
static final String
ModelGen logging name space.static final String
static final String
static final String
static final String
static final String
static final int
static final String
static final String
static final String
static final String
static final int
static final String
static final String
-
Method Summary
Modifier and TypeMethodDescriptionclone()
PUBLIC: Clone the log.void
PUBLIC: This method is called when a config level message needs to be logged.void
PUBLIC: This method is called when a fine level message needs to be logged.void
PUBLIC: This method is called when a finer level message needs to be logged.void
PUBLIC: This method is called when a finest level message needs to be logged.int
getLevel()
PUBLIC: Return the log level.int
PUBLIC: Return the log level; category is only needed where name space is available.PUBLIC:PUBLIC: Get the session that owns this SessionLog.PUBLIC: Return the writer to which an accessor writes logged messages and SQL.void
PUBLIC: This method is called when a info level message needs to be logged.void
PUBLIC: Log a message that does not need to be translated.void
PUBLIC: Log a message with one parameter that needs to be translated.void
PUBLIC: This method is called when the log request is from somewhere session is not available.void
PUBLIC: This method is called when the log request is from somewhere session is not available.void
PUBLIC: Log a message with two parameters that needs to be translated.void
PUBLIC: Log a message with three parameters that needs to be translated.void
PUBLIC: Log a message with four parameters that needs to be translated.void
PUBLIC: Log a message with one parameter that needs to be translated.void
PUBLIC: This method is called when the log request is from somewhere session is not available.void
PUBLIC: This method is called when the log request is from somewhere session is not available.void
PUBLIC: Log a message with two parameters that needs to be translated.void
PUBLIC: Log a message with three parameters that needs to be translated.void
log
(int level, String category, String message, Object param1, Object param2, Object param3, 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, String category, Throwable throwable) PUBLIC: Log a throwable with level.void
logThrowable
(int level, Throwable throwable) PUBLIC: Log aThrowable
with level.void
setLevel
(int level) PUBLIC: Set the log level.void
PUBLIC: Set the log level.void
setSession
(Session session) PUBLIC: Set the session that owns this SessionLog.void
setShouldDisplayData
(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
PUBLIC: Set the writer to which an accessor writes logged messages and SQL.void
PUBLIC: This method is called when a severe level message needs to be logged.boolean
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
PUBLIC: Check if a message of the given level would actually be logged.boolean
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
By default the connection is always printed whenever available, this can be turned off.boolean
By default the date is always printed, this can be turned off.boolean
By default the Session is always printed whenever available, this can be turned off.boolean
By default the thread is logged at FINE or less level, this can be turned off.void
PUBLIC: This method is called when a throwable at finer level needs to be logged.void
PUBLIC: This method is called when a warning level message needs to be logged.
-
Field Details
-
OFF
static final int OFF- See Also:
-
OFF_LABEL
-
SEVERE
static final int SEVERE- See Also:
-
SEVERE_LABEL
-
WARNING
static final int WARNING- See Also:
-
WARNING_LABEL
-
INFO
static final int INFO- See Also:
-
INFO_LABEL
-
CONFIG
static final int CONFIG- See Also:
-
CONFIG_LABEL
-
FINE
static final int FINE- See Also:
-
FINE_LABEL
-
FINER
static final int FINER- See Also:
-
FINER_LABEL
-
FINEST
static final int FINEST- See Also:
-
FINEST_LABEL
-
ALL
static final int ALL- See Also:
-
ALL_LABEL
-
SQL
- See Also:
-
TRANSACTION
- See Also:
-
EVENT
- See Also:
-
CONNECTION
- See Also:
-
QUERY
- See Also:
-
CACHE
- See Also:
-
PROPAGATION
- See Also:
-
SEQUENCING
- See Also:
-
JPA
- See Also:
-
EJB
- See Also:
-
DMS
- See Also:
-
METADATA
- See Also:
-
MONITORING
- See Also:
-
MISC
- See Also:
-
MOXY
- See Also:
-
METAMODEL
- See Also:
-
WEAVER
- See Also:
-
PROPERTIES
- See Also:
-
SERVER
- See Also:
-
DDL
- See Also:
-
DBWS
- See Also:
-
JPARS
- See Also:
-
PROCESSOR
ModelGen logging name space.- See Also:
-
THREAD
- See Also:
-
loggerCatagories
-
-
Method Details
-
log
PUBLIC: EclipseLink will call this method whenever something needs to be logged (messages, SQL, etc.). All the pertinent information will be contained in the specified entry.- Parameters:
entry
- org.eclipse.persistence.sessions.LogEntry
-
shouldLogExceptionStackTrace
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. -
shouldPrintDate
boolean shouldPrintDate()By default the date is always printed, this can be turned off. -
shouldPrintThread
boolean shouldPrintThread()By default the thread is logged at FINE or less level, this can be turned off. -
shouldDisplayData
boolean shouldDisplayData()Return whether bind parameters should be displayed when logging SQL, default is true. -
shouldPrintConnection
boolean shouldPrintConnection()By default the connection is always printed whenever available, this can be turned off. -
shouldPrintSession
boolean shouldPrintSession()By default the Session is always printed whenever available, this can be turned off. -
setShouldDisplayData
Set whether bind parameters should be displayed when logging SQL. -
setShouldLogExceptionStackTrace
void setShouldLogExceptionStackTrace(boolean flag) By default stack trace is logged for SEVERE all the time and at FINER level for WARNING or less. This can be turned off. -
setShouldPrintDate
void setShouldPrintDate(boolean flag) By default date is printed, this can be turned off. -
setShouldPrintThread
void setShouldPrintThread(boolean flag) By default the thread is logged at FINE or less level, this can be turned off. -
setShouldPrintConnection
void setShouldPrintConnection(boolean flag) By default the connection is always printed whenever available, this can be turned off. -
setShouldPrintSession
void setShouldPrintSession(boolean flag) By default the Session is always printed whenever available, this can be turned off. -
getWriter
Writer getWriter()PUBLIC: Return the writer to which an accessor writes logged messages and SQL. If not set, this reference usually defaults to a writer on System.out. To enable logging, logMessages must be turned on in the session. -
setWriter
PUBLIC: Set the writer to which an accessor writes logged messages and SQL. If not set, this reference usually defaults to a writer on System.out. To enable logging, logMessages() is used on the session. -
getLevel
int getLevel() -
getLevelString
String getLevelString()PUBLIC:Return the log level as a string value.
-
getLevel
PUBLIC: Return the log level; category is only needed where name space is available.The EclipseLink logging levels returned correspond to:
Logging levels 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:
Logging categories CACHE
= "cache" CONNECTION
= "connection" DMS
= "dms" EJB
= "ejb" EVENT
= "event" DBWS
= "dbws" JPARS
= "jpars" METAMODEL
= "metamodel" MOXY
= "moxy" PROCESSOR
= "processor" PROPAGATION
= "propagation" PROPERTIES
= "properties" QUERY
= "query" SEQUENCING
= "sequencing" SERVER
= "server" SQL
= "sql" THREAD
= "thread" TRANSACTION
= "transaction" WEAVER
= "weaver" -
setLevel
void setLevel(int level) -
setLevel
PUBLIC: Set the log level. Category is only needed where name space is available.The EclipseLink logging levels available are:
Logging levels 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:
Logging categories CACHE
= "cache" CONNECTION
= "connection" DMS
= "dms" EJB
= "ejb" EVENT
= "event" DBWS
= "dbws" JPARS
= "jpars" METAMODEL
= "metamodel" MOXY
= "moxy" PROCESSOR
= "processor" PROPAGATION
= "propagation" PROPERTIES
= "properties" QUERY
= "query" SEQUENCING
= "sequencing" SERVER
= "server" SQL
= "sql" THREAD
= "thread" TRANSACTION
= "transaction" WEAVER
= "weaver" -
shouldLog
boolean shouldLog(int level) -
shouldLog
PUBLIC: Check if a message of the given level would actually be logged. Category is only needed where name space is available.The EclipseLink logging levels available are:
Logging levels 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:
Logging categories CACHE
= "cache" CONNECTION
= "connection" DMS
= "dms" EJB
= "ejb" EVENT
= "event" DBWS
= "dbws" JPARS
= "jpars" METAMODEL
= "metamodel" MOXY
= "moxy" PROCESSOR
= "processor" PROPAGATION
= "propagation" PROPERTIES
= "properties" QUERY
= "query" SEQUENCING
= "sequencing" SERVER
= "server" SQL
= "sql" THREAD
= "thread" TRANSACTION
= "transaction" WEAVER
= "weaver" -
log
PUBLIC: Log a message that does not need to be translated. This method is intended for external use when logging messages are wanted within the EclipseLink output.The EclipseLink logging levels available are:
Logging levels ALL
= 0 FINEST
= 1 FINER
= 2 FINE
= 3 CONFIG
= 4 INFO
= 5 WARNING
= 6 SEVERE
= 7 OFF
= 8 -
log
-
log
-
log
-
log
-
log
-
log
-
log
-
log
-
log
-
log
-
log
PUBLIC: This method is called when the log request is from somewhere session is not available. shouldTranslate flag determines if the message needs to be translated.The EclipseLink logging levels available are:
Logging levels ALL
= 0 FINEST
= 1 FINER
= 2 FINE
= 3 CONFIG
= 4 INFO
= 5 WARNING
= 6 SEVERE
= 7 OFF
= 8 -
log
PUBLIC: This method is called when the log request is from somewhere session is not available. shouldTranslate flag determines if the message needs to be translated.The EclipseLink logging levels available are:
Logging levels ALL
= 0 FINEST
= 1 FINER
= 2 FINE
= 3 CONFIG
= 4 INFO
= 5 WARNING
= 6 SEVERE
= 7 OFF
= 8 -
throwing
PUBLIC: This method is called when a throwable at finer level needs to be logged. -
severe
PUBLIC: This method is called when a severe level message needs to be logged. The message will be translated -
warning
PUBLIC: This method is called when a warning level message needs to be logged. The message will be translated -
info
PUBLIC: This method is called when a info level message needs to be logged. The message will be translated -
config
PUBLIC: This method is called when a config level message needs to be logged. The message will be translated -
fine
PUBLIC: This method is called when a fine level message needs to be logged. The message will be translated -
finer
PUBLIC: This method is called when a finer level message needs to be logged. The message will be translated -
finest
PUBLIC: This method is called when a finest level message needs to be logged. The message will be translated -
logThrowable
-
logThrowable
-
getSession
Session getSession()PUBLIC: Get the session that owns this SessionLog. -
setSession
PUBLIC: Set the session that owns this SessionLog. -
clone
Object clone()PUBLIC: Clone the log.
-