oracle.soap.server
Class Logger

java.lang.Object
  |
  +--oracle.soap.server.Logger

public abstract class Logger
extends java.lang.Object

Logger defines the capabilities that must be supported by a logger implementation. The logger is used to persistently record error and informational messages.

Each log request specifies the severity, and the information should be logged iff the severity is at least as high as the specified severity. The order of severity in increasing order is:

For example, if the severity is set to SEVERITY_STATUS, any log request with severity of either SEVERITY_STATUS or SEVERITY_ERROR will be logged.


Field Summary
static int DEFAULT_SEVERITY
           
protected  int m_severity
          The logger's severity setting.
static java.lang.String OPTION_SEVERITY
          Configuration option that specifies the severity for the logger.
static int SEVERITY_DEBUG
           
static int SEVERITY_ERROR
           
protected static int SEVERITY_INVALID
           
static java.lang.String[] SEVERITY_NAMES
           
static int SEVERITY_STATUS
           
 
Constructor Summary
Logger()
           
 
Method Summary
 int getSeverity()
          Get the current severity.
protected  java.lang.String getSeverityName(int severity)
          Get the severity name associated with the given severity.
protected  int getSeverityValue(java.lang.String severityName)
          Get the severity value associated with the given severity name.
abstract  void init(java.util.Properties options, ContainerContext context)
          One-time initialization of the logger with its configuration parameters.
 boolean isLoggable(int severity)
          Determine if a message would be logged at the given severity level.
abstract  void log(java.lang.String msg, int severity)
          Log the given message at the given severity.
abstract  void log(java.lang.String msg, java.lang.Throwable t, int severity)
          Log the given message and exception at the given severity.
abstract  void log(java.lang.Throwable t, int severity)
          Log the given exception at the given severity.
 void setSeverity(int severity)
          Set the current severity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEVERITY_ERROR

public static final int SEVERITY_ERROR

SEVERITY_STATUS

public static final int SEVERITY_STATUS

SEVERITY_DEBUG

public static final int SEVERITY_DEBUG

SEVERITY_INVALID

protected static final int SEVERITY_INVALID

SEVERITY_NAMES

public static java.lang.String[] SEVERITY_NAMES

DEFAULT_SEVERITY

public static final int DEFAULT_SEVERITY

OPTION_SEVERITY

public static final java.lang.String OPTION_SEVERITY
Configuration option that specifies the severity for the logger.

m_severity

protected int m_severity
The logger's severity setting.
Constructor Detail

Logger

public Logger()
Method Detail

getSeverityValue

protected final int getSeverityValue(java.lang.String severityName)
Get the severity value associated with the given severity name.
Parameters:
severityName - The name of the serverity level (e.g., error).
Returns:
The severity (SEVERITY_xxx).

getSeverityName

protected final java.lang.String getSeverityName(int severity)
Get the severity name associated with the given severity.
Parameters:
severity - The severity level (SEVERITY_xxx).
Returns:
The severity name.

init

public abstract void init(java.util.Properties options,
                          ContainerContext context)
                   throws SOAPException
One-time initialization of the logger with its configuration parameters.
Parameters:
options - The configuration options for the logger.
context - The context of the container in which the SOAP server is running, which includes information that may be used by the logger.
Throws:
SOAPException - Unable to initialize the logger.

getSeverity

public int getSeverity()
Get the current severity.
Returns:
The current severity setting for the logger.

setSeverity

public void setSeverity(int severity)
Set the current severity.
Parameters:
severity - The new severity setting for the logger.

isLoggable

public boolean isLoggable(int severity)
Determine if a message would be logged at the given severity level.
Parameters:
severity - The severity level to check.
Returns:
true if a message would be logged at the given severity level, else false.

log

public abstract void log(java.lang.String msg,
                         int severity)
Log the given message at the given severity.
Parameters:
msg - The message to log.
severity - The severity at which to log the information.

log

public abstract void log(java.lang.String msg,
                         java.lang.Throwable t,
                         int severity)
Log the given message and exception at the given severity.
Parameters:
msg - The message to log.
t - The throwable exception to log.
severity - The severity at which to log the information.

log

public abstract void log(java.lang.Throwable t,
                         int severity)
Log the given exception at the given severity.
Parameters:
t - The throwable exception to log.
severity - The severity at which to log the information.


Copyright © 2001 Oracle SOAP. All Rights Reserved.