Method Summary |
|
protected DateFormat | buildDefaultDateFormat() Build and return a date format. |
protected void | buildSessionHashCode() Return the current session hash code. |
protected void | buildSessionType() Return the current session type. |
public Object | clone() |
public void | config(String message) PUBLIC:
This method is called when a config level message needs to be logged. |
public void | fine(String message) PUBLIC:
This method is called when a fine level message needs to be logged. |
public void | finer(String message) PUBLIC:
This method is called when a finer level message needs to be logged. |
public void | finest(String message) PUBLIC:
This method is called when a finest level message needs to be logged. |
protected String | formatMessage(SessionLogEntry entry) Return the formatted message based on the information from the given SessionLogEntry. |
protected String | getConnectionString(Accessor connection) Return the specified connection information. |
public DateFormat | getDateFormat() PUBLIC:
Return the date format to be used when printing a log entry date. |
protected String | getDateString(Date date) Return the specified date and/or time information in string. |
public int | getLevel() PUBLIC:
Return the log level. |
public int | getLevel(String category) PUBLIC:
Return the log level for the category name space.
the log level Parameters: category - the string representation of a TopLink category, e.g.
|
public static SessionLog | getLog() PUBLIC:
Return the singleton SessionLog. |
public Session | getSession() PUBLIC:
Get the session. |
protected String | getSessionString(Session session) Return the current session including the type and id. |
protected String | getSessionString() Return the current session including the type and id. |
protected String | getSupplementDetailString(SessionLogEntry entry) Return the supplement detail information including date, session, thread and connection. |
protected String | getThreadString(Thread thread) Return the specified thread information. |
public Writer | getWriter() PUBLIC:
Return the writer that will receive the formatted log entries. |
public void | info(String message) PUBLIC:
This method is called when a info level message needs to be logged. |
public boolean | isOff() PUBLIC:
Check if the log level is set to off. |
public void | log(int level, String message) PUBLIC:
Log a message that does not need to be translated. |
public void | log(int level, String message, Object param) INTERNAL:
Log a message with one parameter that needs to be translated. |
public void | log(int level, String message, Object param1, Object param2) INTERNAL:
Log a message with two parameters that needs to be translated. |
public void | log(int level, String message, Object param1, Object param2, Object param3) INTERNAL:
Log a message with three parameters that needs to be translated. |
public void | log(int level, String message, Object[] params) INTERNAL:
Log a message with an array of parameters that needs to be translated. |
public void | log(int level, String message, Object[] params, boolean shouldTranslate) INTERNAL:
Log a message. |
abstract public void | log(SessionLogEntry sessionLogEntry) |
public void | logThrowable(int level, Throwable throwable) PUBLIC:
Log a throwable with level. |
protected void | printPrefixString(int level) |
public void | setDateFormat(DateFormat dateFormat) PUBLIC:
Set the date format to be used when
printing a log entry date. |
public void | setLevel(int level) PUBLIC:
Set the log level. |
public void | setLevel(int level, String category) PUBLIC:
Set the log level for the category name space.
Parameters: level - the new log level Parameters: category - the string representation of a TopLink category, e.g. |
public static void | setLog(SessionLog sessionLog) PUBLIC:
Set the singleton SessionLog. |
public void | setSession(Session session) PUBLIC:
Set the session. |
public void | setShouldLogExceptionStackTrace(boolean shouldLogExceptionStackTrace) By default the stack is logged for FINER or less (finest). |
public void | setShouldPrintConnection(boolean shouldPrintConnection) By default the connection is printed, this can be turned off. |
public void | setShouldPrintDate(boolean shouldPrintDate) By default the date is always printed, but can be turned off. |
public void | setShouldPrintSession(boolean shouldPrintSession) By default the session (and its connection is available) are printed,
this can be turned off. |
public void | setShouldPrintThread(boolean shouldPrintThread) By default the thread is logged for FINE or less (finer,etc.). |
public void | setWriter(Writer writer) PUBLIC:
Set the writer that will receive the formatted log entries. |
public void | severe(String message) PUBLIC:
This method is called when a severe level message needs to be logged. |
public boolean | shouldLog(int level) PUBLIC:
Check if a message of the given level would actually be logged. |
public boolean | shouldLog(int level, String category) PUBLIC:
Check if a message of the given level would actually be logged for the category name space.
!isOff() is checked to screen out the possibility when both
log level and log request level are set to OFF.
true if the given message level will be logged Parameters: level - the log request level Parameters: category - the string representation of a TopLink category, e.g.
|
public boolean | shouldLogExceptionStackTrace() By default the stack is logged for FINER or less (finest). |
public boolean | shouldPrintConnection() By default the connection is printed, this can be turned off. |
public boolean | shouldPrintDate() By default the date is always printed, but can be turned off. |
public boolean | shouldPrintSession() By default the session (and its connection is available) are printed,
this can be turned off. |
public boolean | shouldPrintThread() By default the thread is logged for FINE or less (finer,etc.). |
public void | throwing(Throwable throwable) PUBLIC:
Log a throwable at FINER level. |
public static String | translateLoggingLevelToString(int loggingLevel) INTERNAL:
Translate the string value of the log level to the constant value. |
public static int | translateStringToLoggingLevel(String loggingLevel) INTERNAL:
Translate the string value of the log level to the constant value. |
public void | warning(String message) PUBLIC:
This method is called when a warning level message needs to be logged. |