|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.logging.AbstractSessionLog org.eclipse.persistence.logging.DefaultSessionLog
public class DefaultSessionLog
Purpose: Default log used for the session when message logging is enabled. The session can log information such as,
SessionLog
,
AbstractSessionLog
,
Serialized FormField Summary | |
---|---|
protected java.lang.String |
fileName
The filename associated with this DefaultSessionLog, if it is being written out to a file |
Fields inherited from class org.eclipse.persistence.logging.AbstractSessionLog |
---|
CONFIG_PREFIX, CONNECTION_STRING, DATE_FORMAT_STR, dateFormat, defaultLog, FINE_PREFIX, FINER_PREFIX, FINEST_PREFIX, INFO_PREFIX, level, session, SEVERE_PREFIX, shouldDisplayData, shouldLogExceptionStackTrace, shouldPrintConnection, shouldPrintDate, shouldPrintSession, shouldPrintThread, THREAD_STRING, TOPLINK_PREFIX, WARNING_PREFIX, writer |
Fields inherited from interface org.eclipse.persistence.logging.SessionLog |
---|
ALL, 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 Summary | |
---|---|
DefaultSessionLog()
PUBLIC: Create a new default session log. |
|
DefaultSessionLog(java.io.Writer writer)
PUBLIC: Create a new default session log for the given writer. |
Method Summary | |
---|---|
int |
getLevel(java.lang.String category)
PUBLIC: Return the log level for the category name space. |
java.lang.String |
getWriterFilename()
PUBLIC: For the given writer, return it's associated filename. |
protected void |
initialize()
Initialize the log to be backward-compatible with the original TopLink log. |
protected void |
initialize(java.io.Writer writer)
Initialize the log. |
void |
log(SessionLogEntry entry)
PUBLIC: Log the entry. |
void |
setLevel(int level,
java.lang.String category)
PUBLIC: Set the log level for the category name space. |
void |
setWriter(java.lang.String aFileName)
PUBLIC: Set the writer that will receive the formatted log entries for a file name. |
boolean |
shouldLog(int level,
java.lang.String category)
PUBLIC: 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. |
protected void |
writeMessage(java.lang.String message)
Append the specified message information to the writer. |
protected void |
writeSeparator()
Append the separator string to the writer. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String fileName
Constructor Detail |
---|
public DefaultSessionLog()
public DefaultSessionLog(java.io.Writer writer)
Method Detail |
---|
public void setLevel(int level, java.lang.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 an EclipseLink category, e.g. "sql", "transaction" ...
public int getLevel(java.lang.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 EclipseLink category, e.g. "sql", "transaction" ...
public boolean shouldLog(int level, java.lang.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 an EclipseLink category, e.g. "sql", "transaction" ...*
protected void initialize()
protected void initialize(java.io.Writer writer)
public void log(SessionLogEntry entry)
log
in interface SessionLog
log
in class AbstractSessionLog
entry
- org.eclipse.persistence.sessions.LogEntrypublic void setWriter(java.lang.String aFileName)
public java.lang.String getWriterFilename()
protected void writeMessage(java.lang.String message) throws java.io.IOException
java.io.IOException
protected void writeSeparator() throws java.io.IOException
java.io.IOException
|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |