at.gv.egovernment.moa.logging
Class Logger

java.lang.Object
  |
  +--at.gv.egovernment.moa.logging.Logger

public class Logger
extends Object

A utility class acting as a facade to the logging subsystem. Configure the logging defaultHierarchy that the Logger uses by calling setHierarchy once before calling any of the logging output functions.

Version:
$Id$
Author:
Patrick Peck

Constructor Summary
Logger()
           
 
Method Summary
static void debug(Object message)
          Log a debug message.
static void error(Object message)
          Log an error message.
static void error(Object message, Throwable t)
          Log an error message.
static void fatal(Object message)
          Log a fatal error message.
static void fatal(Object message, Throwable t)
          Log a fatal error message.
static void info(Object message)
          Log an info message.
static boolean isDebugEnabled()
          Test, if the debug log level is enabled.
static boolean isDebugEnabled(String hierarchy)
          Test, if the debug log level is enabled for a given hierarchy.
static boolean isTraceEnabled()
          Test, if the trace log level is enabled.
static boolean isTraceEnabled(String hierarchy)
          Test, if the trace log level is enabled for a given hierarchy.
static void setHierarchy(String hierarchy)
          Set the default hierarchy to which the Logger should send its logging output.
static void trace(Object message)
          Trace a message.
static void warn(Object message)
          Log a warning message.
static void warn(Object message, Throwable t)
          Log a warning message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Logger

public Logger()
Method Detail

setHierarchy

public static void setHierarchy(String hierarchy)
Set the default hierarchy to which the Logger should send its logging output.
Parameters:
hierarchy - The logging defaultHierarchy.

isTraceEnabled

public static boolean isTraceEnabled()
Test, if the trace log level is enabled.
Returns:
boolean true, if tracing output is enabled false otherwise.

isTraceEnabled

public static boolean isTraceEnabled(String hierarchy)
Test, if the trace log level is enabled for a given hierarchy.
Parameters:
hierarchy - requested log hierarchy
Returns:
boolean true, if tracing output is enabled false otherwise.

trace

public static void trace(Object message)
Trace a message.
Parameters:
message - The message to trace.

isDebugEnabled

public static boolean isDebugEnabled()
Test, if the debug log level is enabled.
Returns:
boolean true, if debug output is enabled false otherwise.

isDebugEnabled

public static boolean isDebugEnabled(String hierarchy)
Test, if the debug log level is enabled for a given hierarchy.
Parameters:
hierarchy - requested log hierarchy
Returns:
boolean true, if debug output is enabled false otherwise.

debug

public static void debug(Object message)
Log a debug message.
Parameters:
message - The message to log.

info

public static void info(Object message)
Log an info message.
Parameters:
message - The message to log.

warn

public static void warn(Object message)
Log a warning message.
Parameters:
message - The message to log.

warn

public static void warn(Object message,
                        Throwable t)
Log a warning message.
Parameters:
message - The message to log.
t - An exception that may be the cause of the warning.

error

public static void error(Object message)
Log an error message.
Parameters:
message - The message to log.

error

public static void error(Object message,
                         Throwable t)
Log an error message.
Parameters:
message - The message to log.
t - An exception that may be the cause of the error.

fatal

public static void fatal(Object message)
Log a fatal error message.
Parameters:
message - The message to log.

fatal

public static void fatal(Object message,
                         Throwable t)
Log a fatal error message.
Parameters:
message - The message to log.
t - An exception that may be the cause of the error.