org.enhydra.shark.logging
Class StandardLoggingManager

java.lang.Object
  extended byorg.enhydra.shark.logging.StandardLoggingManager
All Implemented Interfaces:
LoggingManager

public class StandardLoggingManager
extends java.lang.Object
implements LoggingManager

Implementation of LoggingManager interface.

Author:
Sasa Bojanic, Tanja Jovanovic

Field Summary
 
Fields inherited from interface org.enhydra.shark.api.internal.logging.LoggingManager
DEBUG_LEVEL, ERROR_LEVEL, FATAL_LEVEL, INFO_LEVEL, WARN_LEVEL
 
Constructor Summary
StandardLoggingManager()
           
 
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 log4jlevel)
           
 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
 

Constructor Detail

StandardLoggingManager

public StandardLoggingManager()
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.

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

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

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