Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.share.error
Class RecordingErrorLog

java.lang.Object
  |
  +--oracle.cabo.share.error.RecordingErrorLog
All Implemented Interfaces:
ErrorLog

public class RecordingErrorLog
extends java.lang.Object
implements ErrorLog

An ErrorLog that can record all log entries. RecordingErrorLog will only record log entries of a sufficiently high level to match or exceed the verbosity of the wrapped error log.


Fields inherited from interface oracle.cabo.share.error.ErrorLog
VERBOSITY_DEBUG, VERBOSITY_ERROR, VERBOSITY_INFO, VERBOSITY_NONE, VERBOSITY_WARNING
 
Constructor Summary
RecordingErrorLog(ErrorLog base)
          Creates a RecordingErrorLog that wraps another ErrorLog.
 
Method Summary
 ErrorLog getErrorLog()
          Returns the wrapped error log.
 int getHighestLevel()
          Returns the highest level of any logged message.
 LogEntry[] getLogEntries()
          Returns an array of all logged message and errors.
 java.lang.Throwable[] getLoggedErrors()
          Returns an array of all logged errors.
 boolean isErrorPresent()
          Returns true if any errors have been logged.
 void log(java.lang.String message, java.lang.Throwable t, int level)
          Records a message and error on the log with a specific verbosity level.
 void logError(java.lang.Throwable t)
          Records a Throwable, and sends it to the log.
 void logMessage(java.lang.String s)
          Sends a string message to the log.
 boolean matchesVerbosity(int verbosity)
          Returns true if the given verbosity level would result in a message being logged.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordingErrorLog

public RecordingErrorLog(ErrorLog base)
Creates a RecordingErrorLog that wraps another ErrorLog.
Method Detail

getErrorLog

public ErrorLog getErrorLog()
Returns the wrapped error log.

getLogEntries

public LogEntry[] getLogEntries()
Returns an array of all logged message and errors. Returns null if nothing has been logged.

isErrorPresent

public boolean isErrorPresent()
Returns true if any errors have been logged.
Specified by:
isErrorPresent in interface ErrorLog

getHighestLevel

public int getHighestLevel()
Returns the highest level of any logged message. Returns VERBOSITY_NONE if no messages were logged.

getLoggedErrors

public java.lang.Throwable[] getLoggedErrors()
Returns an array of all logged errors. Returns null if no errors have been logged.
Specified by:
getLoggedErrors in interface ErrorLog

logMessage

public void logMessage(java.lang.String s)
Sends a string message to the log.
Specified by:
logMessage in interface ErrorLog

logError

public void logError(java.lang.Throwable t)
Records a Throwable, and sends it to the log.
Specified by:
logError in interface ErrorLog

log

public void log(java.lang.String message,
                java.lang.Throwable t,
                int level)
Records a message and error on the log with a specific verbosity level.
Specified by:
log in interface ErrorLog

matchesVerbosity

public boolean matchesVerbosity(int verbosity)
Returns true if the given verbosity level would result in a message being logged. Clients can check this before calling log if the log information would be expensive to create.
Specified by:
matchesVerbosity in interface ErrorLog

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.