Skip navigation links

Oracle TopLink Java API Reference
10g Release 3 (10.1.3.1)

B28219-01


oracle.toplink.logging
Class JavaLog

java.lang.Object
  extended byoracle.toplink.logging.AbstractSessionLog
      extended byoracle.toplink.logging.JavaLog

All Implemented Interfaces:
java.lang.Cloneable, SessionLog, SessionLog
Direct Known Subclasses:
OjdlLog

public class JavaLog
extends AbstractSessionLog

PUBLIC:

This is a wrapper class for java.util.logging. It is used when messages need to be logged through java.util.logging.

See Also:
SessionLog, AbstractSessionLog, SessionLogEntry, Session

Field Summary
static java.lang.String DEFAULT_TOPLINK_NAMESPACE
           

 

Fields inherited from interface oracle.toplink.logging.SessionLog
ALL, CACHE, CONFIG, CONNECTION, DMS, EJB, EJB_ANNOTATION, EVENT, FINE, FINER, FINEST, INFO, OFF, PROPAGATION, QUERY, SEQUENCING, SEVERE, SQL, TRANSACTION, WARNING, WEAVER

 

Constructor Summary
JavaLog()
          PUBLIC: Create and return a new JavaLog.

 

Method Summary
 int getLevel(java.lang.String category)
          PUBLIC: Return the effective log level for the name space extracted from session and category.
 void log(SessionLogEntry entry)
          PUBLIC: Log a SessionLogEntry
 void setLevel(int level, java.lang.String category)
          PUBLIC: Set the log level to a logger with name space extracted from the given category.
 void setSession(Session session)
          PUBLIC: Set the session and session namespace.
 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.
 void throwing(java.lang.Throwable throwable)
          PUBLIC: Log a throwable.

 

Methods inherited from class oracle.toplink.logging.AbstractSessionLog
config, fine, finer, finest, getDateFormat, getLevel, getLog, getSession, getWriter, info, log, log, log, log, log, log, log, logThrowable, setDateFormat, setLevel, setLog, setShouldLogDebug, setShouldLogExceptions, setShouldLogExceptionStackTrace, setShouldPrintConnection, setShouldPrintDate, setShouldPrintSession, setShouldPrintThread, setWriter, severe, shouldLog, shouldLogDebug, shouldLogExceptions, shouldLogExceptionStackTrace, shouldPrintConnection, shouldPrintDate, shouldPrintSession, shouldPrintThread, warning

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

DEFAULT_TOPLINK_NAMESPACE

public static final java.lang.String DEFAULT_TOPLINK_NAMESPACE
See Also:
Constant Field Values

Constructor Detail

JavaLog

public JavaLog()
PUBLIC:

Create and return a new JavaLog.

Method Detail

getLevel

public int getLevel(java.lang.String category)
PUBLIC:

Return the effective log level for the name space extracted from session and category. If a Logger's level is set to be null then the Logger will use an effective Level that will be obtained by walking up the parent tree and using the first non-null Level.

Specified by:
getLevel in interface SessionLog
Overrides:
getLevel in class AbstractSessionLog
Parameters:
category - the string representation of a TopLink category, e.g. "sql", "transaction" ...
Returns:
the effective log level.

setLevel

public void setLevel(int level,
                     java.lang.String category)
PUBLIC:

Set the log level to a logger with name space extracted from the given category.

Specified by:
setLevel in interface SessionLog
Overrides:
setLevel in class AbstractSessionLog
Parameters:
level - the new log level
category - the string representation of a TopLink category, e.g. "sql", "transaction" ...

setSession

public void setSession(Session session)
PUBLIC:

Set the session and session namespace.

Specified by:
setSession in interface SessionLog
Overrides:
setSession in class AbstractSessionLog
Parameters:
session - a Session

shouldLog

public 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. Return the shouldLog for the given category from the hashtable. If not found, create a new one and store it in the hashtable.

Specified by:
shouldLog in interface SessionLog
Overrides:
shouldLog in class AbstractSessionLog
Parameters:
level - the log request level
category - the string representation of a TopLink category, e.g. "sql", "transaction" ...*
Returns:
true if the given message level will be logged

log

public void log(SessionLogEntry entry)
PUBLIC:

Log a SessionLogEntry

Specified by:
log in interface SessionLog
Specified by:
log in class AbstractSessionLog
Parameters:
entry - SessionLogEntry that holds all the information for a TopLink logging event

throwing

public void throwing(java.lang.Throwable throwable)
PUBLIC:

Log a throwable.

Specified by:
throwing in interface SessionLog
Overrides:
throwing in class AbstractSessionLog
Parameters:
throwable - a throwable

Skip navigation links

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