com.alee.log
Class Log

java.lang.Object
  extended by com.alee.log.Log

public class Log
extends java.lang.Object

Base logging class which can be used anywhere to log messages and exceptions.

Author:
Mikle Garin

Constructor Summary
Log()
           
 
Method Summary
static void debug(java.lang.Object logFor, java.lang.String message, java.lang.Object... data)
          Writes specified information message into log.
static void error(java.lang.Object logFor, java.lang.String message)
          Writes specified exception message into log.
static void error(java.lang.Object logFor, java.lang.String message, java.lang.Throwable throwable)
          Writes specified exception message into log.
static void error(java.lang.Object logFor, java.lang.Throwable throwable)
          Writes specified exception into log.
static void info(java.lang.Object logFor, java.lang.String message, java.lang.Object... data)
          Writes specified information message into log.
static void initialize()
          Initializes SettingsManager.
static boolean isDebugEnabled()
          Returns whether debug messages are enabled or not.
static void setDebugEnabled(boolean debugEnabled)
          Sets whether debug messages are enabled or not.
static void warn(java.lang.Object logFor, java.lang.String message)
          Writes specified warning message into log.
static void warn(java.lang.Object logFor, java.lang.String message, java.lang.Throwable throwable)
          Writes specified warning message into log.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log

public Log()
Method Detail

initialize

public static void initialize()
Initializes SettingsManager.


isDebugEnabled

public static boolean isDebugEnabled()
Returns whether debug messages are enabled or not.

Returns:
true if debug messages are enabled, false otherwise

setDebugEnabled

public static void setDebugEnabled(boolean debugEnabled)
Sets whether debug messages are enabled or not.

Parameters:
debugEnabled - whether debug messages are enabled or not

info

public static void info(java.lang.Object logFor,
                        java.lang.String message,
                        java.lang.Object... data)
Writes specified information message into log.

Parameters:
logFor - where to log message is attached
message - information message
data - formatting data

debug

public static void debug(java.lang.Object logFor,
                         java.lang.String message,
                         java.lang.Object... data)
Writes specified information message into log.

Parameters:
logFor - where to log message is attached
message - debugEnabled message
data - formatting data

warn

public static void warn(java.lang.Object logFor,
                        java.lang.String message)
Writes specified warning message into log.

Parameters:
logFor - where to log message is attached
message - warning message

warn

public static void warn(java.lang.Object logFor,
                        java.lang.String message,
                        java.lang.Throwable throwable)
Writes specified warning message into log.

Parameters:
logFor - where to log message is attached
message - warning message
throwable - exception

error

public static void error(java.lang.Object logFor,
                         java.lang.Throwable throwable)
Writes specified exception into log.

Parameters:
logFor - where to log message is attached
throwable - exception

error

public static void error(java.lang.Object logFor,
                         java.lang.String message,
                         java.lang.Throwable throwable)
Writes specified exception message into log.

Parameters:
logFor - where to log message is attached
message - exception message
throwable - exception

error

public static void error(java.lang.Object logFor,
                         java.lang.String message)
Writes specified exception message into log.

Parameters:
logFor - where to log message is attached
message - exception message