|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.5.0) E13403-06 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.javatools.db.DBLog
public class DBLog
Log utilities for the core database functionality. Uses the java.util.logging support with a logger called "oracle.javatools.db". See the Logger
javadoc for more details.
Examples:
DBLog.getLogger( this ).log( Level.SEVERE, "Error updating object", exception ); DBLog.getLogger( this ).log( DBLog.getTimingLogLevel(), "Processing took {0} seconds", timing ); DBLog.getLogger( this ).log( DBLog.getTraceLogLevel(), "ID didn't resolve, processing {0} {1} by name instead.", new Object[]{ type, name } ); DBLog.getLogger( this ).log( DBLog.getEventLogLevel(), "provider {0} closed", proName );
Constructor Summary | |
---|---|
DBLog() |
Method Summary | |
---|---|
static java.util.logging.Logger |
getAndInitialiseLogger(java.lang.String name) |
static java.util.logging.Level |
getEventLogLevel() Returns the logging level to use for logging db-api event information. |
static java.util.logging.Logger |
getLogger() Returns the Logger for logging of information, warning and error messages in the api. |
static java.util.logging.Logger |
getLogger(java.lang.Object obj) Returns the Logger appropriate to the given object or class, initialized using getAndInitialiseLogger(java.lang.String) . |
static java.util.logging.Logger |
getSQLLog() Returns the SQL log - any commands issued to the database should be trace printed using this log. |
static java.util.logging.Level |
getTimingLogLevel() Returns the logging level to use for logging db-api timings (e.g. |
static java.util.logging.Level |
getTraceLogLevel() Returns the logging level to use for logging db-api tracing (for example sql execution, diff result set print outs etc). |
static void |
initLogger(java.util.logging.Logger logger) |
static void |
log(java.lang.String msg, java.lang.Object... params) Logs the given message to the tracing log level. |
static void |
logDifferences(DBObject obj1, DBObject obj2, DBObjectProvider pro) Prints out the differences between the two objects to the trace log level. |
static void |
logStackTrace(java.lang.Throwable t) Logs the given exception if the db_api tracing is enabled. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DBLog()
Method Detail |
---|
public static final java.util.logging.Logger getLogger()
public static final java.util.logging.Logger getLogger(java.lang.Object obj)
getAndInitialiseLogger(java.lang.String)
. The package of the class is used as the logger name.public static final java.util.logging.Logger getAndInitialiseLogger(java.lang.String name)
public static final java.util.logging.Level getTimingLogLevel()
public static final java.util.logging.Level getTraceLogLevel()
public static final java.util.logging.Level getEventLogLevel()
public static final void logStackTrace(java.lang.Throwable t)
getLogger()
and log the throwable at the appropriate level directly. It means the logging information will be more accurate.
As the stack trace will be logged to the trace level it will not appear in normal builds. Use getLogger()
and log to Level.SEVERE
, Level.WARNING
or Level.INFO
for that to happen.
public static final void log(java.lang.String msg, java.lang.Object... params)
msg
- the message to logparams
- optional parameters for the message to be formatted withgetTraceLogLevel()
public static final void logDifferences(DBObject obj1, DBObject obj2, DBObjectProvider pro)
getTraceLogLevel()
public static final java.util.logging.Logger getSQLLog()
public static void initLogger(java.util.logging.Logger logger)
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.5.0) E13403-06 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |