com.Prominic.util
Class log

java.lang.Object
  extended by com.Prominic.util.log

public class log
extends java.lang.Object

This class is a wrapper to LogSystem. After you pass it a LogSystem object you can call its methods w/o having a handle to the object. All its methods are static.


Field Summary
protected static LogSystem ls
          LogSystem object.
 
Constructor Summary
log()
           
 
Method Summary
static boolean dbg(java.lang.String msg)
          Writes a debug message to the log.
static boolean err(java.lang.String msg)
          Writes an error message to the log.
static boolean err(java.lang.String msg, java.lang.Throwable t)
          Writes an error message to the log.
static void flush()
          Flushes the log stream.
static LogSystem getLogSystem()
          Returns the current LogSystem handle.
static boolean msg(java.lang.String msg)
          Writes a (common) message to the log.
static void setLogSystem(LogSystem ls)
          Sets the current LogSystem handle.
static boolean warn(java.lang.String msg)
          Writes an warning message to the log.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ls

protected static LogSystem ls
LogSystem object. By default the messages are logged to console.

Constructor Detail

log

public log()
Method Detail

dbg

public static boolean dbg(java.lang.String msg)
Writes a debug message to the log.

Parameters:
msg - The message to be logged.
Returns:
true if message was written ok, false on error.

err

public static boolean err(java.lang.String msg)
Writes an error message to the log.

Parameters:
msg - The message to be logged.
Returns:
true if message was written ok, false on error.

err

public static boolean err(java.lang.String msg,
                          java.lang.Throwable t)
Writes an error message to the log.

Parameters:
msg - The message to be logged.
Returns:
true if message was written ok, false on error.

flush

public static void flush()
Flushes the log stream.


getLogSystem

public static LogSystem getLogSystem()
Returns the current LogSystem handle.

Returns:
a handle to the current LogSystem object.

msg

public static boolean msg(java.lang.String msg)
Writes a (common) message to the log.

Parameters:
msg - The message to be logged.
Returns:
true if message was written ok, false on error.

setLogSystem

public static void setLogSystem(LogSystem ls)
Sets the current LogSystem handle.

Parameters:
ls - a handle to a LogSystem object.

warn

public static boolean warn(java.lang.String msg)
Writes an warning message to the log.

Parameters:
msg - The message to be logged.
Returns:
true if message was written ok, false on error.