org.enhydra.shark.logging
Class EnhydraLoggingManager

java.lang.Object
  extended by org.enhydra.shark.logging.EnhydraLoggingManager
All Implemented Interfaces:
LoggingManager

public class EnhydraLoggingManager
extends java.lang.Object
implements LoggingManager

Implementation of LoggingManager interface.

Author:
Sasa Bojanic, Nenad Bogdanovic

Field Summary
static java.lang.String ENHYDRA_DEFAULT_LOG_CLASS
           
static java.lang.String ENHYDRA_LOG_CLASS
           
 
Fields inherited from interface org.enhydra.shark.api.internal.logging.LoggingManager
DEBUG_LEVEL, ERROR_LEVEL, FATAL_LEVEL, INFO_LEVEL, WARN_LEVEL
 
Constructor Summary
EnhydraLoggingManager()
           
 
Method Summary
 void configure(CallbackUtilities cus)
          Configures StandardLoggingManager.
 void debug(WMSessionHandle shandle, java.lang.String msg)
          Log a message object with the DEBUG level.
 void debug(WMSessionHandle shandle, java.lang.String msg, java.lang.Exception ex)
          Log a message object with the DEBUG level.
 void debug(WMSessionHandle shandle, java.lang.String channel, java.lang.String msg)
          Log a message object with the DEBUG level.
 void debug(WMSessionHandle shandle, java.lang.String channel, java.lang.String msg, java.lang.Exception ex)
          Log a message object with the DEBUG level.
 void error(WMSessionHandle shandle, java.lang.String msg)
          Log a message object with the ERROR Level.
 void error(WMSessionHandle shandle, java.lang.String msg, java.lang.Exception ex)
          Log a message object with the ERROR Level.
 void error(WMSessionHandle shandle, java.lang.String channel, java.lang.String msg)
          Log a message object with the ERROR Level.
 void error(WMSessionHandle shandle, java.lang.String channel, java.lang.String msg, java.lang.Exception ex)
          Log a message object with the ERROR Level.
 void info(WMSessionHandle shandle, java.lang.String msg)
          Log a message object with the INFO Level.
 void info(WMSessionHandle shandle, java.lang.String msg, java.lang.Exception ex)
          Log a message object with the INFO Level.
 void info(WMSessionHandle shandle, java.lang.String channel, java.lang.String msg)
          Log a message object with the INFO Level.
 void info(WMSessionHandle shandle, java.lang.String channel, java.lang.String msg, java.lang.Exception ex)
          Log a message object with the INFO Level.
protected  boolean isEnabled(int sharkLevel, int logerLevel)
           
 boolean isEnabled(WMSessionHandle shandle, int level)
           
 boolean isEnabled(WMSessionHandle shandle, java.lang.String channel, int level)
           
 void warn(WMSessionHandle shandle, java.lang.String msg)
          Log a message object with the WARN Level.
 void warn(WMSessionHandle shandle, java.lang.String msg, java.lang.Exception ex)
          Log a message object with the WARN Level.
 void warn(WMSessionHandle shandle, java.lang.String channel, java.lang.String msg)
          Log a message object with the WARN Level.
 void warn(WMSessionHandle shandle, java.lang.String channel, java.lang.String msg, java.lang.Exception ex)
          Log a message object with the WARN Level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENHYDRA_LOG_CLASS

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

ENHYDRA_DEFAULT_LOG_CLASS

public static final java.lang.String ENHYDRA_DEFAULT_LOG_CLASS
See Also:
Constant Field Values
Constructor Detail

EnhydraLoggingManager

public EnhydraLoggingManager()
Method Detail

configure

public void configure(CallbackUtilities cus)
               throws java.lang.Exception
Configures StandardLoggingManager.

Specified by:
configure in interface LoggingManager
Parameters:
cus - an instance of CallbackUtilities used to get properties for configuring logging in Shark.
Throws:
java.lang.Exception - thrown if configuring doesn't succeed.

error

public void error(WMSessionHandle shandle,
                  java.lang.String msg)
           throws java.lang.Exception
Log a message object with the ERROR Level.

Specified by:
error in interface LoggingManager
Parameters:
msg - the message to log.
Throws:
java.lang.Exception - If something unexpected happens.

error

public void error(WMSessionHandle shandle,
                  java.lang.String msg,
                  java.lang.Exception ex)
           throws java.lang.Exception
Log a message object with the ERROR Level.

Specified by:
error in interface LoggingManager
Parameters:
msg - the message to log.
ex - the exception to log, including its stack trace.
Throws:
java.lang.Exception - If something unexpected happens.

error

public void error(WMSessionHandle shandle,
                  java.lang.String channel,
                  java.lang.String msg)
           throws java.lang.Exception
Log a message object with the ERROR Level.

Specified by:
error in interface LoggingManager
Parameters:
channel - the log channel to be used for logging.
msg - the message to log.
Throws:
java.lang.Exception - If something unexpected happens.

error

public void error(WMSessionHandle shandle,
                  java.lang.String channel,
                  java.lang.String msg,
                  java.lang.Exception ex)
           throws java.lang.Exception
Log a message object with the ERROR Level.

Specified by:
error in interface LoggingManager
Parameters:
channel - the log channel to be used for logging.
msg - the message to log.
ex - the exception to log, including its stack trace.
Throws:
java.lang.Exception - If something unexpected happens.

warn

public void warn(WMSessionHandle shandle,
                 java.lang.String msg)
          throws java.lang.Exception
Log a message object with the WARN Level.

Specified by:
warn in interface LoggingManager
Parameters:
msg - the message to log.
Throws:
java.lang.Exception - If something unexpected happens.

warn

public void warn(WMSessionHandle shandle,
                 java.lang.String msg,
                 java.lang.Exception ex)
          throws java.lang.Exception
Log a message object with the WARN Level.

Specified by:
warn in interface LoggingManager
Parameters:
msg - the message to log.
ex - the exception to log, including its stack trace.
Throws:
java.lang.Exception - If something unexpected happens.

warn

public void warn(WMSessionHandle shandle,
                 java.lang.String channel,
                 java.lang.String msg)
          throws java.lang.Exception
Log a message object with the WARN Level.

Specified by:
warn in interface LoggingManager
Parameters:
channel - the log channel to be used for logging.
msg - the message to log.
Throws:
java.lang.Exception - If something unexpected happens.

warn

public void warn(WMSessionHandle shandle,
                 java.lang.String channel,
                 java.lang.String msg,
                 java.lang.Exception ex)
          throws java.lang.Exception
Log a message object with the WARN Level.

Specified by:
warn in interface LoggingManager
Parameters:
channel - the log channel to be used for logging.
msg - the message to log.
ex - the exception to log, including its stack trace.
Throws:
java.lang.Exception - If something unexpected happens.

info

public void info(WMSessionHandle shandle,
                 java.lang.String msg)
          throws java.lang.Exception
Log a message object with the INFO Level.

Specified by:
info in interface LoggingManager
Parameters:
msg - the message to log.
Throws:
java.lang.Exception - If something unexpected happens.

info

public void info(WMSessionHandle shandle,
                 java.lang.String msg,
                 java.lang.Exception ex)
          throws java.lang.Exception
Log a message object with the INFO Level.

Specified by:
info in interface LoggingManager
Parameters:
msg - the message to log.
ex - the exception to log, including its stack trace.
Throws:
java.lang.Exception - If something unexpected happens.

info

public void info(WMSessionHandle shandle,
                 java.lang.String channel,
                 java.lang.String msg)
          throws java.lang.Exception
Log a message object with the INFO Level.

Specified by:
info in interface LoggingManager
Parameters:
channel - the log channel to be used for logging.
msg - the message to log.
Throws:
java.lang.Exception - If something unexpected happens.

info

public void info(WMSessionHandle shandle,
                 java.lang.String channel,
                 java.lang.String msg,
                 java.lang.Exception ex)
          throws java.lang.Exception
Log a message object with the INFO Level.

Specified by:
info in interface LoggingManager
Parameters:
channel - the log channel to be used for logging.
msg - the message to log.
ex - the exception to log, including its stack trace.
Throws:
java.lang.Exception - If something unexpected happens.

debug

public void debug(WMSessionHandle shandle,
                  java.lang.String msg)
           throws java.lang.Exception
Log a message object with the DEBUG level.

Specified by:
debug in interface LoggingManager
Parameters:
msg - the message to log.
Throws:
java.lang.Exception - If something unexpected happens.

debug

public void debug(WMSessionHandle shandle,
                  java.lang.String msg,
                  java.lang.Exception ex)
           throws java.lang.Exception
Log a message object with the DEBUG level.

Specified by:
debug in interface LoggingManager
Parameters:
msg - the message to log.
ex - the exception to log, including its stack trace.
Throws:
java.lang.Exception - If something unexpected happens.

debug

public void debug(WMSessionHandle shandle,
                  java.lang.String channel,
                  java.lang.String msg)
           throws java.lang.Exception
Log a message object with the DEBUG level.

Specified by:
debug in interface LoggingManager
Parameters:
channel - the log channel to be used for logging.
msg - the message to log.
Throws:
java.lang.Exception - If something unexpected happens.

debug

public void debug(WMSessionHandle shandle,
                  java.lang.String channel,
                  java.lang.String msg,
                  java.lang.Exception ex)
           throws java.lang.Exception
Log a message object with the DEBUG level.

Specified by:
debug in interface LoggingManager
Parameters:
channel - the log channel to be used for logging.
msg - the message to log.
ex - the exception to log, including its stack trace.
Throws:
java.lang.Exception - If something unexpected happens.

isEnabled

public boolean isEnabled(WMSessionHandle shandle,
                         int level)
                  throws java.lang.Exception
Specified by:
isEnabled in interface LoggingManager
Throws:
java.lang.Exception

isEnabled

public boolean isEnabled(WMSessionHandle shandle,
                         java.lang.String channel,
                         int level)
                  throws java.lang.Exception
Specified by:
isEnabled in interface LoggingManager
Throws:
java.lang.Exception

isEnabled

protected boolean isEnabled(int sharkLevel,
                            int logerLevel)
                     throws java.lang.Exception
Throws:
java.lang.Exception