org.homeunix.thecave.moss.util
Class Log

java.lang.Object
  extended by org.homeunix.thecave.moss.util.Log

public class Log
extends java.lang.Object

Simple logging system. Lets you specifiy priorities for messages, and then (at runtime) determine which are printed out. This version prints to an OutputStream, and defaults to StdErr.


Field Summary
static int ALERT
          Deprecated.  
static int CRITICAL
          Deprecated.  
static int DEBUG
           
static int EMERGENCY
           
static int ERROR
           
static int INFO
           
static int NOTICE
          Deprecated.  
static int VERBOSE
           
static int WARNING
           
 
Constructor Summary
Log()
           
 
Method Summary
static void alert(java.lang.Object message)
          Deprecated.  
static void alert(java.lang.Object message, java.lang.Throwable exception)
          Deprecated.  
static void critical(java.lang.Object message)
          Deprecated.  
static void critical(java.lang.Object message, java.lang.Throwable exception)
          Deprecated.  
static void debug(java.lang.Object message)
           
static void debug(java.lang.Object message, java.lang.Throwable exception)
           
static void emergency(java.lang.Object message)
           
static void emergency(java.lang.Object message, java.lang.Throwable exception)
           
static void error(java.lang.Object message)
           
static void error(java.lang.Object message, java.lang.Throwable exception)
           
static int getLogLevel()
           
static java.io.PrintStream getPrintStream()
          Returns the current print stream to which output is going.
static void info(java.lang.Object message)
           
static void info(java.lang.Object message, java.lang.Throwable exception)
           
static void notice(java.lang.Object message)
          Deprecated.  
static void notice(java.lang.Object message, java.lang.Throwable exception)
          Deprecated.  
static void setLogLevel(int logLevel)
           
static void setPrintStream(java.io.PrintStream destination)
          Set the destination of the output.
static void verbose(java.lang.Object message)
           
static void verbose(java.lang.Object message, java.lang.Throwable exception)
           
static void warning(java.lang.Object message)
           
static void warning(java.lang.Object message, java.lang.Throwable exception)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CRITICAL

public static final int CRITICAL
Deprecated. 
See Also:
Constant Field Values

ALERT

public static final int ALERT
Deprecated. 
See Also:
Constant Field Values

EMERGENCY

public static final int EMERGENCY
See Also:
Constant Field Values

ERROR

public static final int ERROR
See Also:
Constant Field Values

WARNING

public static final int WARNING
See Also:
Constant Field Values

NOTICE

public static final int NOTICE
Deprecated. 
See Also:
Constant Field Values

INFO

public static final int INFO
See Also:
Constant Field Values

DEBUG

public static final int DEBUG
See Also:
Constant Field Values

VERBOSE

public static final int VERBOSE
See Also:
Constant Field Values
Constructor Detail

Log

public Log()
Method Detail

emergency

public static void emergency(java.lang.Object message)

emergency

public static void emergency(java.lang.Object message,
                             java.lang.Throwable exception)

alert

public static void alert(java.lang.Object message)
Deprecated. 

Deprecated. Equivalent to ERROR level; use this instead.


alert

public static void alert(java.lang.Object message,
                         java.lang.Throwable exception)
Deprecated. 

Deprecated. Equivalent to ERROR level; use this instead.


critical

public static void critical(java.lang.Object message)
Deprecated. 

Deprecated. Equivalent to EMERGENCY level; use this instead.


critical

public static void critical(java.lang.Object message,
                            java.lang.Throwable exception)
Deprecated. 

Deprecated. Equivalent to EMERGENCY level; use this instead.


error

public static void error(java.lang.Object message)

error

public static void error(java.lang.Object message,
                         java.lang.Throwable exception)

warning

public static void warning(java.lang.Object message)

warning

public static void warning(java.lang.Object message,
                           java.lang.Throwable exception)

notice

public static void notice(java.lang.Object message)
Deprecated. 

Deprecated. Equivalent to INFO level; use this instead.


notice

public static void notice(java.lang.Object message,
                          java.lang.Throwable exception)
Deprecated. 

Deprecated. Equivalent to INFO level; use this instead.


info

public static void info(java.lang.Object message)

info

public static void info(java.lang.Object message,
                        java.lang.Throwable exception)

debug

public static void debug(java.lang.Object message)

debug

public static void debug(java.lang.Object message,
                         java.lang.Throwable exception)

verbose

public static void verbose(java.lang.Object message)

verbose

public static void verbose(java.lang.Object message,
                           java.lang.Throwable exception)

getLogLevel

public static int getLogLevel()
Returns:
Returns the logLevel.

setLogLevel

public static void setLogLevel(int logLevel)
Parameters:
logLevel - The logLevel to set.

setPrintStream

public static void setPrintStream(java.io.PrintStream destination)
Set the destination of the output. By default this is System.err, but you can also specify a file if you wish.

Parameters:
destination -

getPrintStream

public static java.io.PrintStream getPrintStream()
Returns the current print stream to which output is going.

Returns: