Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.share.error
Class BaseErrorLog

java.lang.Object
  |
  +--oracle.cabo.share.error.BaseErrorLog
All Implemented Interfaces:
ErrorLog
Direct Known Subclasses:
ServletErrorLog

public class BaseErrorLog
extends java.lang.Object
implements ErrorLog

Implementation of ErrorLog that sends errors to System.err.


Fields inherited from interface oracle.cabo.share.error.ErrorLog
VERBOSITY_DEBUG, VERBOSITY_ERROR, VERBOSITY_INFO, VERBOSITY_NONE, VERBOSITY_WARNING
 
Constructor Summary
BaseErrorLog()
          Creates a BaseErrorLog.
 
Method Summary
static boolean canIgnore(java.lang.Throwable t)
          Returns whether the exception can be safely ignored.
 java.lang.Throwable[] getLoggedErrors()
          Returns an array of all logged errors.
 int getVerbosityLevel()
          Returns the verbosity level.
 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 System.err.
 boolean matchesVerbosity(int level)
          Returns true if the given verbosity level would result in a message being logged.
protected  void outputError(java.lang.Throwable t)
          Outputs the throwable to System.err.
protected  void outputText(java.lang.String message)
          Outputs text to System.err.
 void setVerbosityLevel(int verbosity)
          Sets the verbosity level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseErrorLog

public BaseErrorLog()
Creates a BaseErrorLog.
Method Detail

getVerbosityLevel

public int getVerbosityLevel()
Returns the verbosity level.

setVerbosityLevel

public void setVerbosityLevel(int verbosity)
Sets the verbosity level.

isErrorPresent

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

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 System.err.
Specified by:
logMessage in interface ErrorLog

logError

public final void logError(java.lang.Throwable t)
Records a Throwable, and sends it to the log. Subclasses should override outputError(), not this method.
Specified by:
logError in interface ErrorLog
See Also:
outputError(java.lang.Throwable)

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. The message will only be logged if the verbosity level set on the log is sufficiently high.
Specified by:
log in interface ErrorLog

canIgnore

public static boolean canIgnore(java.lang.Throwable t)
Returns whether the exception can be safely ignored. Detects exceptions that correspond simply to IO halting midway (because the client cancelled, for example).

matchesVerbosity

public boolean matchesVerbosity(int level)
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

outputText

protected void outputText(java.lang.String message)
Outputs text to System.err.

outputError

protected void outputError(java.lang.Throwable t)
Outputs the throwable to System.err.

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

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