com.sdm.quasar.client.core.common.logging
Class DomainLogger

java.lang.Object
  extended bycom.sdm.quasar.client.core.common.logging.DomainLogger

public final class DomainLogger
extends java.lang.Object

A logger, that demands specifying a domain name or a domain class for logging.

Version:
1.0
Author:
Thomas Wolf

Method Summary
static boolean isLogging(int loggingLevel, java.lang.Class domainClass)
          Tests, whether messages will be logged at the given logging level
static boolean isLogging(int loggingLevel, java.lang.String domainName)
          Tests, whether messages will be logged at the given logging level
static void log(java.lang.Class domainClass, java.lang.String message)
          Logs a message, if logging is enabled for the logging level LoggingLevel.DEBUG.
static void log(int loggingLevel, java.lang.Class domainClass, java.lang.String message)
          Logs a message, if logging is enabled for the given logging level.
static void log(int loggingLevel, java.lang.String domainName, java.lang.String message)
          Logs a message, if logging is enabled for the given logging level.
static void log(java.lang.String domainName, java.lang.String message)
          Logs a message, if logging is enabled for the logging level LoggingLevel.DEBUG.
static void logError(int loggingLevel, java.lang.Class domainClass, java.lang.String message, java.lang.Throwable exception)
          Logs a message including an exception if logging is enabled for the given logging level.
static void logError(int loggingLevel, java.lang.Class domainClass, java.lang.Throwable exception)
          Logs an exception if logging is enabled for the given logging level.
static void logError(int loggingLevel, java.lang.String domainName, java.lang.String message, java.lang.Throwable exception)
          Logs a message including an exception if logging is enabled for the given logging level.
static void logError(int loggingLevel, java.lang.String domainName, java.lang.Throwable exception)
          Logs an exception if logging is enabled for the given logging level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isLogging

public static boolean isLogging(int loggingLevel,
                                java.lang.String domainName)
Tests, whether messages will be logged at the given logging level

Parameters:
loggingLevel - the level to be tested, one of the constants from LoggingLevel
Returns:
true, iff messages will be logged at the given level

log

public static void log(java.lang.String domainName,
                       java.lang.String message)
Logs a message, if logging is enabled for the logging level LoggingLevel.DEBUG.

Parameters:
message - the message to be logged

log

public static void log(int loggingLevel,
                       java.lang.String domainName,
                       java.lang.String message)
Logs a message, if logging is enabled for the given logging level.

Parameters:
loggingLevel - the level to be tested, one of the constants from LoggingLevel
message - the message to be logged

logError

public static void logError(int loggingLevel,
                            java.lang.String domainName,
                            java.lang.String message,
                            java.lang.Throwable exception)
Logs a message including an exception if logging is enabled for the given logging level.

Parameters:
loggingLevel - the level to be tested, one of the constants from LoggingLevel
message - the message to be logged
exception - the exception to be logged

logError

public static void logError(int loggingLevel,
                            java.lang.String domainName,
                            java.lang.Throwable exception)
Logs an exception if logging is enabled for the given logging level.

Parameters:
loggingLevel - the level to be tested, one of the constants from LoggingLevel
exception - the exception to be logged

isLogging

public static boolean isLogging(int loggingLevel,
                                java.lang.Class domainClass)
Tests, whether messages will be logged at the given logging level

Parameters:
loggingLevel - the level to be tested, one of the constants from LoggingLevel
Returns:
true, iff messages will be logged at the given level

log

public static void log(java.lang.Class domainClass,
                       java.lang.String message)
Logs a message, if logging is enabled for the logging level LoggingLevel.DEBUG.

Parameters:
message - the message to be logged

log

public static void log(int loggingLevel,
                       java.lang.Class domainClass,
                       java.lang.String message)
Logs a message, if logging is enabled for the given logging level.

Parameters:
loggingLevel - the level to be tested, one of the constants from LoggingLevel
message - the message to be logged

logError

public static void logError(int loggingLevel,
                            java.lang.Class domainClass,
                            java.lang.String message,
                            java.lang.Throwable exception)
Logs a message including an exception if logging is enabled for the given logging level.

Parameters:
loggingLevel - the level to be tested, one of the constants from LoggingLevel
message - the message to be logged
exception - the exception to be logged

logError

public static void logError(int loggingLevel,
                            java.lang.Class domainClass,
                            java.lang.Throwable exception)
Logs an exception if logging is enabled for the given logging level.

Parameters:
loggingLevel - the level to be tested, one of the constants from LoggingLevel
exception - the exception to be logged