Oracle Fusion Middleware Java API Reference for Oracle TopLink (Deprecated)
11g Release 1 (11.1.1)

B32476-04

oracle.toplink.sessions
Interface SessionLog

All Known Subinterfaces:
SessionLog
All Known Implementing Classes:
AbstractSessionLog, DefaultSessionLog, DefaultSessionLog, JavaLog, ServerLog, WlsLog

Deprecated. Please use oracle.toplink.logging.SessionLog

public interface SessionLog

SessionLog is the ever-so-simple interface used by TopLink to log generated messages and SQL. An implementor of this interface can be passed to the TopLink session (via the #setSessionLog(SessionLog) method); and all logging data will be passed through to the implementor via an instance of SessionLogEntry. This can be used to supplement debugging; or the entries could be stored in a database instead of logged to System.out, etc.

This class defines Toplink logging levels (that are used throughout Toplink 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, TopLink categories used for logging name space are defined with the following String values:

 SQL  = "sql"
 TRANSACTION  = "transaction"
 EVENT  = "event"
 QUERY  = "query"
 CACHE  = "cache"
 PROPAGATION  = "propagation"
 SEQUENCING  = "sequencing"
 EJB  = "ejb"
 DMS  = "dms"
 EJB_ANNOTATION = "ejb_annotation"
 WEAVER  = "weaver"

Since:
TOPLink/Java 3.0
See Also:
AbstractSessionLog, SessionLogEntry, Session

Field Summary
static int ALL
          Deprecated.  
static java.lang.String CACHE
          Deprecated.  
static int CONFIG
          Deprecated.  
static java.lang.String CONNECTION
          Deprecated.  
static java.lang.String DMS
          Deprecated.  
static java.lang.String EJB
          Deprecated.  
static java.lang.String EJB_OR_METADATA
          Deprecated.  
static java.lang.String EVENT
          Deprecated.  
static int FINE
          Deprecated.  
static int FINER
          Deprecated.  
static int FINEST
          Deprecated.  
static int INFO
          Deprecated.  
static java.lang.String[] loggerCatagories
          Deprecated.  
static int OFF
          Deprecated.  
static java.lang.String PROPAGATION
          Deprecated.  
static java.lang.String PROPERTIES
          Deprecated.  
static java.lang.String QUERY
          Deprecated.  
static java.lang.String SEQUENCING
          Deprecated.  
static java.lang.String SERVER
          Deprecated.  
static int SEVERE
          Deprecated.  
static java.lang.String SQL
          Deprecated.  
static java.lang.String TRANSACTION
          Deprecated.  
static int WARNING
          Deprecated.  
static java.lang.String WEAVER
          Deprecated.  
 
Method Summary
 void config(java.lang.String message)
          Deprecated. This method is called when a config level message needs to be logged.
 void fine(java.lang.String message)
          Deprecated. This method is called when a fine level message needs to be logged.
 void finer(java.lang.String message)
          Deprecated. This method is called when a finer level message needs to be logged.
 void finest(java.lang.String message)
          Deprecated. This method is called when a finest level message needs to be logged.
 int getLevel()
          Deprecated. Return the log level.
 int getLevel(java.lang.String category)
          Deprecated. Return the log level; category is only needed where name space is available.
 java.lang.String getLevelString()
          Deprecated. Return the log level as a string value.
 Session getSession()
          Deprecated. Get the session that owns this SessionLog.
 java.io.Writer getWriter()
          Deprecated. Return the writer to which an accessor writes logged messages and SQL.
 void info(java.lang.String message)
          Deprecated. This method is called when a info level message needs to be logged.
 void log(int level, java.lang.String message)
          Deprecated. Log a message that does not need to be translated.
 void log(int level, java.lang.String message, java.lang.Object param)
          Deprecated. Log a message with one parameter that needs to be translated.
 void log(int level, java.lang.String message, java.lang.Object[] arguments)
          Deprecated. This method is called when the log request is from somewhere session is not available.
 void log(int level, java.lang.String message, java.lang.Object[] arguments, boolean shouldTranslate)
          Deprecated. This method is called when the log request is from somewhere session is not available.
 void log(int level, java.lang.String message, java.lang.Object param1, java.lang.Object param2)
          Deprecated. Log a message with two parameters that needs to be translated.
 void log(int level, java.lang.String message, java.lang.Object param1, java.lang.Object param2, java.lang.Object param3)
          Deprecated. Log a message with three parameters that needs to be translated.
 void log(SessionLogEntry entry)
          Deprecated. TopLink will call this method whenever something needs to be logged (messages, SQL, etc.).
 void log(SessionLogEntry entry)
          Deprecated. Replaced by log(oracle.toplink.logging.SessionLogEntry)
 void logThrowable(int level, java.lang.Throwable throwable)
          Deprecated. Log a throwable with level.
 void setLevel(int level)
          Deprecated. Set the log level.
 void setLevel(int level, java.lang.String category)
          Deprecated. Set the log level.
 void setSession(Session session)
          Deprecated. Set the session that owns this SessionLog.
 void setShouldLogDebug(boolean flag)
          Deprecated. replaced by level
 void setShouldLogExceptions(boolean flag)
          Deprecated. replaced by level
 void setShouldLogExceptionStackTrace(boolean flag)
          Deprecated. By default stack trace is logged for SEVERE all the time and at FINER level for WARNING or less.
 void setShouldPrintConnection(boolean flag)
          Deprecated. By default the connection is always printed whenever available, this can be turned off.
 void setShouldPrintDate(boolean flag)
          Deprecated. By default date is printed, this can be turned off.
 void setShouldPrintSession(boolean flag)
          Deprecated. By default the Session is always printed whenever available, this can be turned off.
 void setShouldPrintThread(boolean flag)
          Deprecated. By default the thread is logged at FINE or less level, this can be turned off.
 void setWriter(java.io.Writer log)
          Deprecated. Set the writer to which an accessor writes logged messages and SQL.
 void severe(java.lang.String message)
          Deprecated. This method is called when a severe level message needs to be logged.
 boolean shouldLog(int level)
          Deprecated. Check if a message of the given level would actually be logged.
 boolean shouldLog(int level, java.lang.String category)
          Deprecated. Check if a message of the given level would actually be logged.
 boolean shouldLogDebug()
          Deprecated. replaced by level
 boolean shouldLogExceptions()
          Deprecated. replaced by level
 boolean shouldLogExceptionStackTrace()
          Deprecated. 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 shouldPrintConnection()
          Deprecated. By default the connection is always printed whenever available, this can be turned off.
 boolean shouldPrintDate()
          Deprecated. By default the date is always printed, this can be turned off.
 boolean shouldPrintSession()
          Deprecated. By default the Session is always printed whenever available, this can be turned off.
 boolean shouldPrintThread()
          Deprecated. By default the thread is logged at FINE or less level, this can be turned off.
 void throwing(java.lang.Throwable throwable)
          Deprecated. This method is called when a throwable at finer level needs to be logged.
 void warning(java.lang.String message)
          Deprecated. This method is called when a warning level message needs to be logged.
 

Field Detail

OFF

static final int OFF
Deprecated. 
See Also:
Constant Field Values

SEVERE

static final int SEVERE
Deprecated. 
See Also:
Constant Field Values

WARNING

static final int WARNING
Deprecated. 
See Also:
Constant Field Values

INFO

static final int INFO
Deprecated. 
See Also:
Constant Field Values

CONFIG

static final int CONFIG
Deprecated. 
See Also:
Constant Field Values

FINE

static final int FINE
Deprecated. 
See Also:
Constant Field Values

FINER

static final int FINER
Deprecated. 
See Also:
Constant Field Values

FINEST

static final int FINEST
Deprecated. 
See Also:
Constant Field Values

ALL

static final int ALL
Deprecated. 
See Also:
Constant Field Values

SQL

static final java.lang.String SQL
Deprecated. 
See Also:
Constant Field Values

TRANSACTION

static final java.lang.String TRANSACTION
Deprecated. 
See Also:
Constant Field Values

EVENT

static final java.lang.String EVENT
Deprecated. 
See Also:
Constant Field Values

CONNECTION

static final java.lang.String CONNECTION
Deprecated. 
See Also:
Constant Field Values

QUERY

static final java.lang.String QUERY
Deprecated. 
See Also:
Constant Field Values

CACHE

static final java.lang.String CACHE
Deprecated. 
See Also:
Constant Field Values

PROPAGATION

static final java.lang.String PROPAGATION
Deprecated. 
See Also:
Constant Field Values

SEQUENCING

static final java.lang.String SEQUENCING
Deprecated. 
See Also:
Constant Field Values

EJB

static final java.lang.String EJB
Deprecated. 
See Also:
Constant Field Values

DMS

static final java.lang.String DMS
Deprecated. 
See Also:
Constant Field Values

EJB_OR_METADATA

static final java.lang.String EJB_OR_METADATA
Deprecated. 
See Also:
Constant Field Values

WEAVER

static final java.lang.String WEAVER
Deprecated. 
See Also:
Constant Field Values

PROPERTIES

static final java.lang.String PROPERTIES
Deprecated. 
See Also:
Constant Field Values

SERVER

static final java.lang.String SERVER
Deprecated. 
See Also:
Constant Field Values

loggerCatagories

static final java.lang.String[] loggerCatagories
Deprecated. 
Method Detail

log

void log(SessionLogEntry entry)
Deprecated. 
TopLink 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 - oracle.toplink.sessions.LogEntry

log

void log(SessionLogEntry entry)
Deprecated. Replaced by log(oracle.toplink.logging.SessionLogEntry)

OBSOLETE:


shouldLogDebug

boolean shouldLogDebug()
Deprecated. replaced by level

OBSOLETE:


shouldLogExceptions

boolean shouldLogExceptions()
Deprecated. replaced by level

OBSOLETE:


shouldLogExceptionStackTrace

boolean shouldLogExceptionStackTrace()
Deprecated. 
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()
Deprecated. 
By default the date is always printed, this can be turned off.


shouldPrintThread

boolean shouldPrintThread()
Deprecated. 
By default the thread is logged at FINE or less level, this can be turned off.


shouldPrintConnection

boolean shouldPrintConnection()
Deprecated. 
By default the connection is always printed whenever available, this can be turned off.


shouldPrintSession

boolean shouldPrintSession()
Deprecated. 
By default the Session is always printed whenever available, this can be turned off.


setShouldLogDebug

void setShouldLogDebug(boolean flag)
Deprecated. replaced by level

OBSOLETE:


setShouldLogExceptions

void setShouldLogExceptions(boolean flag)
Deprecated. replaced by level

OBSOLETE:


setShouldLogExceptionStackTrace

void setShouldLogExceptionStackTrace(boolean flag)
Deprecated. 
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)
Deprecated. 
By default date is printed, this can be turned off.


setShouldPrintThread

void setShouldPrintThread(boolean flag)
Deprecated. 
By default the thread is logged at FINE or less level, this can be turned off.


setShouldPrintConnection

void setShouldPrintConnection(boolean flag)
Deprecated. 
By default the connection is always printed whenever available, this can be turned off.


setShouldPrintSession

void setShouldPrintSession(boolean flag)
Deprecated. 
By default the Session is always printed whenever available, this can be turned off.


getWriter

java.io.Writer getWriter()
Deprecated. 
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

void setWriter(java.io.Writer log)
Deprecated. 
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()
Deprecated. 
Return the log level. Used when session is not available.

The Toplink logging levels returned correspond to:

ALL  = 0
FINEST  = 1
FINER  = 2
FINE  = 3
CONFIG  = 4
INFO  = 5
WARNING = 6
SEVERE  = 7
OFF  = 8


getLevelString

java.lang.String getLevelString()
Deprecated. 

Return the log level as a string value.


getLevel

int getLevel(java.lang.String category)
Deprecated. 
Return the log level; category is only needed where name space is available.

The Toplink logging levels returned correspond to:

ALL  = 0
FINEST  = 1
FINER  = 2
FINE  = 3
CONFIG  = 4
INFO  = 5
WARNING = 6
SEVERE  = 7
OFF  = 8

The Toplink categories for logging name space are:

SQL  = "sql"
TRANSACTION  = "transaction"
EVENT  = "event"
QUERY  = "query"
CACHE  = "cache"
PROPAGATION  = "propagation"
SEQUENCING  = "sequencing"
EJB  = "ejb"
DMS  = "dms"
EJB_ANNOTATION = "ejb_annotation"
WEAVER  = "weaver"
PROPERTIES  = "properties"
SERVER  = "server"


setLevel

void setLevel(int level)
Deprecated. 
Set the log level. Used when session is not available.

The Toplink logging levels available are:

ALL  = 0
FINEST  = 1
FINER  = 2
FINE  = 3
CONFIG  = 4
INFO  = 5
WARNING = 6
SEVERE  = 7
OFF  = 8


setLevel

void setLevel(int level,
              java.lang.String category)
Deprecated. 
Set the log level. Category is only needed where name space is available.

The Toplink logging levels available are:

ALL  = 0
FINEST  = 1
FINER  = 2
FINE  = 3
CONFIG  = 4
INFO  = 5
WARNING = 6
SEVERE  = 7
OFF  = 8

The Toplink categories for logging name space are:

SQL  = "sql"
TRANSACTION  = "transaction"
EVENT  = "event"
QUERY  = "query"
CACHE  = "cache"
PROPAGATION  = "propagation"
SEQUENCING  = "sequencing"
EJB  = "ejb"
DMS  = "dms"
EJB_ANNOTATION = "ejb_annotation"
WEAVER  = "weaver"


shouldLog

boolean shouldLog(int level)
Deprecated. 
Check if a message of the given level would actually be logged. Used when session is not available.

The Toplink logging levels available are:

ALL  = 0
FINEST  = 1
FINER  = 2
FINE  = 3
CONFIG  = 4
INFO  = 5
WARNING = 6
SEVERE  = 7
OFF  = 8


shouldLog

boolean shouldLog(int level,
                  java.lang.String category)
Deprecated. 
Check if a message of the given level would actually be logged. Category is only needed where name space is available.

The Toplink logging levels available are:

ALL  = 0
FINEST  = 1
FINER  = 2
FINE  = 3
CONFIG  = 4
INFO  = 5
WARNING = 6
SEVERE  = 7
OFF  = 8

The Toplink categories for logging name space are:

SQL  = "sql"
TRANSACTION  = "transaction"
EVENT  = "event"
QUERY  = "query"
CACHE  = "cache"
PROPAGATION  = "propagation"
SEQUENCING  = "sequencing"
EJB  = "ejb"
DMS  = "dms"
EJB_ANNOTATION = "ejb_annotation"
WEAVER  = "weaver"


log

void log(int level,
         java.lang.String message)
Deprecated. 
Log a message that does not need to be translated. This method is intended for external use when logging messages are wanted within the TopLink output.

The Toplink logging levels available are:

ALL  = 0
FINEST  = 1
FINER  = 2
FINE  = 3
CONFIG  = 4
INFO  = 5
WARNING = 6
SEVERE  = 7
OFF  = 8


log

void log(int level,
         java.lang.String message,
         java.lang.Object param)
Deprecated. 
Log a message with one parameter that needs to be translated.

The Toplink logging levels available are:

ALL  = 0
FINEST  = 1
FINER  = 2
FINE  = 3
CONFIG  = 4
INFO  = 5
WARNING = 6
SEVERE  = 7
OFF  = 8


log

void log(int level,
         java.lang.String message,
         java.lang.Object param1,
         java.lang.Object param2)
Deprecated. 
Log a message with two parameters that needs to be translated.

The Toplink logging levels available are:

ALL  = 0
FINEST  = 1
FINER  = 2
FINE  = 3
CONFIG  = 4
INFO  = 5
WARNING = 6
SEVERE  = 7
OFF  = 8


log

void log(int level,
         java.lang.String message,
         java.lang.Object param1,
         java.lang.Object param2,
         java.lang.Object param3)
Deprecated. 
Log a message with three parameters that needs to be translated.

The Toplink logging levels available are:

ALL  = 0
FINEST  = 1
FINER  = 2
FINE  = 3
CONFIG  = 4
INFO  = 5
WARNING = 6
SEVERE  = 7
OFF  = 8


log

void log(int level,
         java.lang.String message,
         java.lang.Object[] arguments)
Deprecated. 
This method is called when the log request is from somewhere session is not available. The message needs to be translated.

The Toplink logging levels available are:

ALL  = 0
FINEST  = 1
FINER  = 2
FINE  = 3
CONFIG  = 4
INFO  = 5
WARNING = 6
SEVERE  = 7
OFF  = 8


log

void log(int level,
         java.lang.String message,
         java.lang.Object[] arguments,
         boolean shouldTranslate)
Deprecated. 
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 Toplink logging levels available are:

ALL  = 0
FINEST  = 1
FINER  = 2
FINE  = 3
CONFIG  = 4
INFO  = 5
WARNING = 6
SEVERE  = 7
OFF  = 8


throwing

void throwing(java.lang.Throwable throwable)
Deprecated. 
This method is called when a throwable at finer level needs to be logged.


severe

void severe(java.lang.String message)
Deprecated. 
This method is called when a severe level message needs to be logged. The message will be translated


warning

void warning(java.lang.String message)
Deprecated. 
This method is called when a warning level message needs to be logged. The message will be translated


info

void info(java.lang.String message)
Deprecated. 
This method is called when a info level message needs to be logged. The message will be translated


config

void config(java.lang.String message)
Deprecated. 
This method is called when a config level message needs to be logged. The message will be translated


fine

void fine(java.lang.String message)
Deprecated. 
This method is called when a fine level message needs to be logged. The message will be translated


finer

void finer(java.lang.String message)
Deprecated. 
This method is called when a finer level message needs to be logged. The message will be translated


finest

void finest(java.lang.String message)
Deprecated. 
This method is called when a finest level message needs to be logged. The message will be translated


logThrowable

void logThrowable(int level,
                  java.lang.Throwable throwable)
Deprecated. 
Log a throwable with level.

The Toplink logging levels available are:

ALL  = 0
FINEST  = 1
FINER  = 2
FINE  = 3
CONFIG  = 4
INFO  = 5
WARNING = 6
SEVERE  = 7
OFF  = 8


getSession

Session getSession()
Deprecated. 
Get the session that owns this SessionLog.


setSession

void setSession(Session session)
Deprecated. 
Set the session that owns this SessionLog.


Copyright © 1998, 2012, Oracle. All Rights Reserved.