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 |
AbstractSessionLog, SessionLogEntry, Session
| Modifier and Type | Field and Description |
|---|---|
| public static final int | |
| public static final String | |
| public static final String | |
| public static final int | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final int | |
| public static final String | |
| public static final int | |
| public static final String | |
| public static final int | |
| public static final String | |
| public static final int | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String[] | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final int | |
| public static final String | |
| public static final String | PROCESSOR
ModelGen logging name space. |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final int | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final int | |
| public static final String | |
| public static final String |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| public void | |
| public void | |
| public void | |
| public void | |
| public int | |
| public int | |
| public String | |
| public Session | |
| public Writer | |
| public void | |
| public void | log(SessionLogEntry
org.eclipse.persistence.sessions.LogEntry entry)PUBLIC: EclipseLink will call this method whenever something needs to be logged (messages, SQL, etc.). |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setShouldDisplayData(Boolean shouldDisplayData)
Set whether bind parameters should be displayed when logging SQL. |
| public void | setShouldLogExceptionStackTrace(boolean flag)
By default stack trace is logged for SEVERE all the time and at FINER level for WARNING or less. |
| public void | setShouldPrintConnection(boolean flag)
By default the connection is always printed whenever available, this can be turned off. |
| public void | |
| public void | setShouldPrintSession(boolean flag)
By default the Session is always printed whenever available, this can be turned off. |
| public void | setShouldPrintThread(boolean flag)
By default the thread is logged at FINE or less level, this can be turned off. |
| public void | |
| public void | |
| public boolean | shouldDisplayData()
Return whether bind parameters should be displayed when logging SQL, default is true. |
| public boolean | |
| public boolean | |
| public 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. |
| public boolean | shouldPrintConnection()
By default the connection is always printed whenever available, this can be turned off. |
| public boolean | |
| public boolean | shouldPrintSession()
By default the Session is always printed whenever available, this can be turned off. |
| public boolean | |
| public void | |
| public void |
| ALL | back to summary |
|---|---|
| public static final int ALL | |
| ALL_LABEL | back to summary |
|---|---|
| public static final String ALL_LABEL | |
| CACHE | back to summary |
|---|---|
| public static final String CACHE | |
| CONFIG | back to summary |
|---|---|
| public static final int CONFIG | |
| CONFIG_LABEL | back to summary |
|---|---|
| public static final String CONFIG_LABEL | |
| CONNECTION | back to summary |
|---|---|
| public static final String CONNECTION | |
| DBWS | back to summary |
|---|---|
| public static final String DBWS | |
| DDL | back to summary |
|---|---|
| public static final String DDL | |
| DMS | back to summary |
|---|---|
| public static final String DMS | |
| EJB | back to summary |
|---|---|
| public static final String EJB | |
| EVENT | back to summary |
|---|---|
| public static final String EVENT | |
| FINE | back to summary |
|---|---|
| public static final int FINE | |
| FINE_LABEL | back to summary |
|---|---|
| public static final String FINE_LABEL | |
| FINER | back to summary |
|---|---|
| public static final int FINER | |
| FINER_LABEL | back to summary |
|---|---|
| public static final String FINER_LABEL | |
| FINEST | back to summary |
|---|---|
| public static final int FINEST | |
| FINEST_LABEL | back to summary |
|---|---|
| public static final String FINEST_LABEL | |
| INFO | back to summary |
|---|---|
| public static final int INFO | |
| INFO_LABEL | back to summary |
|---|---|
| public static final String INFO_LABEL | |
| JPA | back to summary |
|---|---|
| public static final String JPA | |
| JPARS | back to summary |
|---|---|
| public static final String JPARS | |
| loggerCatagories | back to summary |
|---|---|
| public static final String[] loggerCatagories | |
| METADATA | back to summary |
|---|---|
| public static final String METADATA | |
| METAMODEL | back to summary |
|---|---|
| public static final String METAMODEL | |
| MISC | back to summary |
|---|---|
| public static final String MISC | |
| MONITORING | back to summary |
|---|---|
| public static final String MONITORING | |
| MOXY | back to summary |
|---|---|
| public static final String MOXY | |
| OFF | back to summary |
|---|---|
| public static final int OFF | |
| OFF_LABEL | back to summary |
|---|---|
| public static final String OFF_LABEL | |
| PROCESSOR | back to summary |
|---|---|
| public static final String PROCESSOR ModelGen logging name space. | |
| PROPAGATION | back to summary |
|---|---|
| public static final String PROPAGATION | |
| PROPERTIES | back to summary |
|---|---|
| public static final String PROPERTIES | |
| QUERY | back to summary |
|---|---|
| public static final String QUERY | |
| SEQUENCING | back to summary |
|---|---|
| public static final String SEQUENCING | |
| SERVER | back to summary |
|---|---|
| public static final String SERVER | |
| SEVERE | back to summary |
|---|---|
| public static final int SEVERE | |
| SEVERE_LABEL | back to summary |
|---|---|
| public static final String SEVERE_LABEL | |
| SQL | back to summary |
|---|---|
| public static final String SQL | |
| THREAD | back to summary |
|---|---|
| public static final String THREAD | |
| TRANSACTION | back to summary |
|---|---|
| public static final String TRANSACTION | |
| WARNING | back to summary |
|---|---|
| public static final int WARNING | |
| WARNING_LABEL | back to summary |
|---|---|
| public static final String WARNING_LABEL | |
| WEAVER | back to summary |
|---|---|
| public static final String WEAVER | |
| clone | back to summary |
|---|---|
| public Object clone() PUBLIC: Clone the log. | |
| config | back to summary |
|---|---|
| public void config(String message) PUBLIC: This method is called when a config level message needs to be logged. The message will be translated | |
| fine | back to summary |
|---|---|
| public void fine(String message) PUBLIC: This method is called when a fine level message needs to be logged. The message will be translated | |
| finer | back to summary |
|---|---|
| public void finer(String message) PUBLIC: This method is called when a finer level message needs to be logged. The message will be translated | |
| finest | back to summary |
|---|---|
| public void finest(String message) PUBLIC: This method is called when a finest level message needs to be logged. The message will be translated | |
| getLevel | back to summary | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public int getLevel() PUBLIC: Return the log level. Used when session is not available.
The EclipseLink logging levels returned correspond to:
| ||||||||||||||||||||||||||||
| getLevel | back to summary | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public int getLevel(String category) PUBLIC: Return the log level; category is only needed where name space is available.
The EclipseLink logging levels returned correspond to:
The EclipseLink categories for the logging name space are:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| getLevelString | back to summary |
|---|---|
| public String getLevelString() PUBLIC: Return the log level as a string value. | |
| getSession | back to summary |
|---|---|
| public Session getSession() PUBLIC: Get the session that owns this SessionLog. | |
| getWriter | back to summary |
|---|---|
| public 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. | |
| info | back to summary |
|---|---|
| public void info(String message) PUBLIC: This method is called when a info level message needs to be logged. The message will be translated | |
| log | back to summary |
|---|---|
| public void log(SessionLogEntry entry) 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.
| |
| log | back to summary | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public void log(int level, String message) 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:
| ||||||||||||||||||||||||||||
| log | back to summary | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public void log(int level, String message, Object param) PUBLIC: Log a message with one parameter that needs to be translated.
The EclipseLink logging levels available are:
| ||||||||||||||||||||||||||||
| log | back to summary | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public void log(int level, String category, String message, Object param) PUBLIC: Log a message with one parameter that needs to be translated.
The EclipseLink logging levels available are:
| ||||||||||||||||||||||||||||
| log | back to summary | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public void log(int level, String message, Object param1, Object param2) PUBLIC: Log a message with two parameters that needs to be translated.
The EclipseLink logging levels available are:
| ||||||||||||||||||||||||||||
| log | back to summary | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public void log(int level, String category, String message, Object param1, Object param2) PUBLIC: Log a message with two parameters that needs to be translated.
The EclipseLink logging levels available are:
| ||||||||||||||||||||||||||||
| log | back to summary | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public void log(int level, String message, Object param1, Object param2, Object param3) PUBLIC: Log a message with three parameters that needs to be translated.
The EclipseLink logging levels available are:
| ||||||||||||||||||||||||||||
| log | back to summary | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public void log(int level, String category, String message, Object param1, Object param2, Object param3) PUBLIC: Log a message with three parameters that needs to be translated.
The EclipseLink logging levels available are:
| ||||||||||||||||||||||||||||
| log | back to summary | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public void log(int level, String message, Object param1, Object param2, Object param3, Object param4) PUBLIC: Log a message with four parameters that needs to be translated.
The EclipseLink logging levels available are:
| ||||||||||||||||||||||||||||
| log | back to summary | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public 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.
The EclipseLink logging levels available are:
| ||||||||||||||||||||||||||||
| log | back to summary | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public void log(int level, String message, Object[] arguments) PUBLIC: This method is called when the log request is from somewhere session is not available. The message needs to be translated.
The EclipseLink logging levels available are:
| ||||||||||||||||||||||||||||
| log | back to summary | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public void log(int level, String category, String message, Object[] arguments) PUBLIC: This method is called when the log request is from somewhere session is not available. The message needs to be translated.
The EclipseLink logging levels available are:
| ||||||||||||||||||||||||||||
| log | back to summary | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public void log(int level, String message, Object[] arguments, boolean shouldTranslate) 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:
| ||||||||||||||||||||||||||||
| log | back to summary | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public void log(int level, String category, String message, Object[] arguments, boolean shouldTranslate) 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:
| ||||||||||||||||||||||||||||
| logThrowable | back to summary | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public void logThrowable(int level, Throwable throwable) PUBLIC:
Log a
The EclipseLink logging levels available are:
| ||||||||||||||||||||||||||||
| logThrowable | back to summary | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public void logThrowable(int level, String category, Throwable throwable) PUBLIC: Log a throwable with level.
The EclipseLink logging levels available are:
| ||||||||||||||||||||||||||||
| setLevel | back to summary | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public void setLevel(int level) PUBLIC: Set the log level. Used when session is not available.
The EclipseLink logging levels available are:
| ||||||||||||||||||||||||||||
| setLevel | back to summary | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public void setLevel(int level, String category) PUBLIC: Set the log level. Category is only needed where name space is available.
The EclipseLink logging levels available are:
The EclipseLink categories for the logging name space are:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| setSession | back to summary |
|---|---|
| public void setSession(Session session) PUBLIC: Set the session that owns this SessionLog. | |
| setShouldDisplayData | back to summary |
|---|---|
| public void setShouldDisplayData(Boolean shouldDisplayData) Set whether bind parameters should be displayed when logging SQL. | |
| setShouldLogExceptionStackTrace | back to summary |
|---|---|
| public 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. | |
| setShouldPrintConnection | back to summary |
|---|---|
| public void setShouldPrintConnection(boolean flag) By default the connection is always printed whenever available, this can be turned off. | |
| setShouldPrintDate | back to summary |
|---|---|
| public void setShouldPrintDate(boolean flag) By default date is printed, this can be turned off. | |
| setShouldPrintSession | back to summary |
|---|---|
| public void setShouldPrintSession(boolean flag) By default the Session is always printed whenever available, this can be turned off. | |
| setShouldPrintThread | back to summary |
|---|---|
| public void setShouldPrintThread(boolean flag) By default the thread is logged at FINE or less level, this can be turned off. | |
| setWriter | back to summary |
|---|---|
| public void setWriter(Writer log) 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. | |
| severe | back to summary |
|---|---|
| public void severe(String message) PUBLIC: This method is called when a severe level message needs to be logged. The message will be translated | |
| shouldDisplayData | back to summary |
|---|---|
| public boolean shouldDisplayData() Return whether bind parameters should be displayed when logging SQL, default is true. | |
| shouldLog | back to summary | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public boolean shouldLog(int level) PUBLIC: Check if a message of the given level would actually be logged. Used when session is not available. The EclipseLink logging levels available are:
| ||||||||||||||||||||||||||||
| shouldLog | back to summary | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public boolean shouldLog(int level, String category) 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:
The EclipseLink categories for the logging name space are:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| shouldLogExceptionStackTrace | back to summary |
|---|---|
| public 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. | |
| shouldPrintConnection | back to summary |
|---|---|
| public boolean shouldPrintConnection() By default the connection is always printed whenever available, this can be turned off. | |
| shouldPrintDate | back to summary |
|---|---|
| public boolean shouldPrintDate() By default the date is always printed, this can be turned off. | |
| shouldPrintSession | back to summary |
|---|---|
| public boolean shouldPrintSession() By default the Session is always printed whenever available, this can be turned off. | |
| shouldPrintThread | back to summary |
|---|---|
| public boolean shouldPrintThread() By default the thread is logged at FINE or less level, this can be turned off. | |
| throwing | back to summary |
|---|---|
| public void throwing(Throwable throwable) PUBLIC: This method is called when a throwable at finer level needs to be logged. | |
| warning | back to summary |
|---|---|
| public void warning(String message) PUBLIC: This method is called when a warning level message needs to be logged. The message will be translated | |