public class DefaultSessionLog extends AbstractSessionLog implements Serializable
Purpose: Default log used for the session when message logging is enabled. The session can log information such as,
SessionLog
,
AbstractSessionLog
,
Serialized FormALL, ALL_LABEL, CACHE, CONFIG, CONFIG_LABEL, CONNECTION, DMS, EJB, EJB_OR_METADATA, EVENT, FINE, FINE_LABEL, FINER, FINER_LABEL, FINEST, FINEST_LABEL, INFO, INFO_LABEL, loggerCatagories, METAMODEL, OFF, OFF_LABEL, PROPAGATION, PROPERTIES, QUERY, SEQUENCING, SERVER, SEVERE, SEVERE_LABEL, SQL, TRANSACTION, WARNING, WARNING_LABEL, WEAVER
Constructor and Description |
---|
DefaultSessionLog()
PUBLIC:
Create a new default session log.
|
DefaultSessionLog(Writer writer)
PUBLIC:
Create a new default session log for the given writer.
|
Modifier and Type | Method and Description |
---|---|
int |
getLevel(String category)
PUBLIC:
|
String |
getWriterFilename()
PUBLIC:
For the given writer, return it's associated filename.
|
void |
log(SessionLogEntry entry)
PUBLIC:
Log the entry.
|
void |
setLevel(int level,
String category)
PUBLIC:
|
void |
setWriter(String aFileName)
PUBLIC:
Set the writer that will receive the
formatted log entries for a file name.
|
boolean |
shouldLog(int level,
String category)
PUBLIC:
|
clone, config, fine, finer, finest, getDateFormat, getDefaultLoggingLevel, getLevel, getLevelString, getLog, getSession, getWriter, info, isOff, log, log, log, log, log, log, log, logThrowable, setDateFormat, setLevel, setLog, setSession, setShouldLogExceptionStackTrace, setShouldPrintConnection, setShouldPrintDate, setShouldPrintSession, setShouldPrintThread, setWriter, setWriter, severe, shouldLog, shouldLogExceptionStackTrace, shouldPrintConnection, shouldPrintDate, shouldPrintSession, shouldPrintThread, throwing, translateLoggingLevelToString, translateStringToLoggingLevel, warning
public DefaultSessionLog()
public DefaultSessionLog(Writer writer)
public void setLevel(int level, String category)
AbstractSessionLog
Set the log level for the category name space.
setLevel
in interface SessionLog
setLevel
in class AbstractSessionLog
level
- the new log levelcategory
- the string representation of a TopLink category, e.g. "sql", "transaction" ...
public int getLevel(String category)
AbstractSessionLog
Return the log level for the category name space.
getLevel
in interface SessionLog
getLevel
in class AbstractSessionLog
category
- the string representation of a TopLink category, e.g. "sql", "transaction" ...
public boolean shouldLog(int level, String category)
Check if a message of the given level would actually be logged by the logger with name space built from the given session and category.
shouldLog
in interface SessionLog
shouldLog
in class AbstractSessionLog
level
- the log request levelcategory
- the string representation of a TopLink category, e.g. "sql", "transaction" ...*
public void log(SessionLogEntry entry)
log
in interface SessionLog
log
in class AbstractSessionLog
entry
- org.eclipse.persistence.sessions.LogEntrypublic void setWriter(String aFileName)
public String getWriterFilename()