org.enhydra.shark.api.internal.logging
Interface LoggingManager


public interface LoggingManager

LoggingManager handles logging in Shark.

Author:
Sasa Bojanic, Vladimir Puskas, Tanja Jovanovic

Field Summary
static int DEBUG_LEVEL
           
static int ERROR_LEVEL
           
static int FATAL_LEVEL
           
static int INFO_LEVEL
           
static int WARN_LEVEL
           
 
Method Summary
 void configure(CallbackUtilities cus)
          Method configure is called at Shark start up, to configure implementation of LoggingManager.
 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.
 boolean isEnabled(WMSessionHandle shandle, int level)
          Returns if the specified logging level is enabled for the default channel.
 boolean isEnabled(WMSessionHandle shandle, java.lang.String channel, int level)
          Returns if the specified logging level is enabled for the specified channel.
 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.
 

Field Detail

DEBUG_LEVEL

public static final int DEBUG_LEVEL
See Also:
Constant Field Values

INFO_LEVEL

public static final int INFO_LEVEL
See Also:
Constant Field Values

WARN_LEVEL

public static final int WARN_LEVEL
See Also:
Constant Field Values

ERROR_LEVEL

public static final int ERROR_LEVEL
See Also:
Constant Field Values

FATAL_LEVEL

public static final int FATAL_LEVEL
See Also:
Constant Field Values
Method Detail

configure

public void configure(CallbackUtilities cus)
               throws java.lang.Exception
Method configure is called at Shark start up, to configure implementation of 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
Returns if the specified logging level is enabled for the default channel.

Throws:
java.lang.Exception

isEnabled

public boolean isEnabled(WMSessionHandle shandle,
                         java.lang.String channel,
                         int level)
                  throws java.lang.Exception
Returns if the specified logging level is enabled for the specified channel.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.