logging
Class LogHolder

java.lang.Object
  extended by logging.LogHolder

public final class LogHolder
extends java.lang.Object

This class stores the Log instance.


Field Summary
static int DETAIL_LEVEL_HIGH
          prints the log message, package, classname, method name and the source line of the log message; this enables some IDEs to jump to the log source by clicking on the message line
static int DETAIL_LEVEL_HIGHEST
          additionally prints the whole stack trace of an error log if available
static int DETAIL_LEVEL_LOWER
          prints the log message, the class name and the source line of the log message
static int DETAIL_LEVEL_LOWEST
          prints the log message only
 
Method Summary
 void finalize()
           
static int getDetailLevel()
          Gets the detail level of all log messages.
static boolean isLogged(int a_logLevel, int a_logType)
           
static void log(int logLevel, int logType, java.lang.String message)
          Write the log data to the Log instance.
static void log(int logLevel, int logType, java.lang.String message, boolean a_bAddCallingClass)
          Write the log data to the Log instance.
static void log(int a_logLevel, int a_logType, java.lang.String a_message, java.lang.Throwable a_throwable)
          Write the log data for a Throwable to the Log instance.
static void log(int a_logLevel, int a_logType, java.lang.Throwable a_throwable)
          Write the log data for a Throwable to the Log instance.
static void setDetailLevel(int a_messageDetailLevel)
          Sets the detail level of all log messages.
static void setLogInstance(Log logInstance)
          Sets the logInstance.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DETAIL_LEVEL_LOWEST

public static final int DETAIL_LEVEL_LOWEST
prints the log message only

See Also:
Constant Field Values

DETAIL_LEVEL_LOWER

public static final int DETAIL_LEVEL_LOWER
prints the log message, the class name and the source line of the log message

See Also:
Constant Field Values

DETAIL_LEVEL_HIGH

public static final int DETAIL_LEVEL_HIGH
prints the log message, package, classname, method name and the source line of the log message; this enables some IDEs to jump to the log source by clicking on the message line

See Also:
Constant Field Values

DETAIL_LEVEL_HIGHEST

public static final int DETAIL_LEVEL_HIGHEST
additionally prints the whole stack trace of an error log if available

See Also:
Constant Field Values
Method Detail

finalize

public void finalize()
              throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

setDetailLevel

public static void setDetailLevel(int a_messageDetailLevel)
Sets the detail level of all log messages. Use one of the class constants to set it. The detail levels range from 0 (DETAIL_LEVEL_LOWEST) to DETAIL_LEVEL_HIGHEST. The higher the detail level, the more detailed information will be written to the logs.

Parameters:
a_messageDetailLevel - the detail level of all log messages

getDetailLevel

public static int getDetailLevel()
Gets the detail level of all log messages.

Returns:
a_messageDetailLevel the detail level of all log messages

log

public static void log(int a_logLevel,
                       int a_logType,
                       java.lang.Throwable a_throwable)
Write the log data for a Throwable to the Log instance.

Parameters:
a_logLevel - The log level (see constants in class LogLevel).
a_logType - The log type (see constants in class LogType).
a_throwable - a Throwable to log

log

public static void log(int a_logLevel,
                       int a_logType,
                       java.lang.String a_message,
                       java.lang.Throwable a_throwable)
Write the log data for a Throwable to the Log instance.

Parameters:
a_logLevel - The log level (see constants in class LogLevel).
a_logType - The log type (see constants in class LogType).
a_message - an (optional) log message
a_throwable - a Throwable to log

log

public static void log(int logLevel,
                       int logType,
                       java.lang.String message,
                       boolean a_bAddCallingClass)
Write the log data to the Log instance.

Parameters:
logLevel - The log level (see constants in class LogLevel).
logType - The log type (see constants in class LogType).
message - The message to log.
a_bAddCallingClass - true if not only the name and class of the current method should be logged but also the name of the method in the class that has called this method; false if only the name of the current method should be logged (default)

log

public static void log(int logLevel,
                       int logType,
                       java.lang.String message)
Write the log data to the Log instance.

Parameters:
logLevel - The log level (see constants in class LogLevel).
logType - The log type (see constants in class LogType).
message - The message to log.

setLogInstance

public static void setLogInstance(Log logInstance)
Sets the logInstance.

Parameters:
logInstance - The instance of a Log implementation.

isLogged

public static boolean isLogged(int a_logLevel,
                               int a_logType)