com.go.trove.log
Class Syslog

java.lang.Object
  |
  +--com.go.trove.log.Syslog

public class Syslog
extends java.lang.Object

Contains references to a static Log instance that can be used for general system-wide logging. By default, log messages are written to System.out or System.err. When "installed", all output provided to System.out and System.err is redirected into the system log.

Version:
15 , 9/07/00
Author:
Brian S O'Neill
See Also:
Log

Method Summary
static void debug(java.lang.String s)
          Shortcut to Syslog.log().debug(String).
static void debug(java.lang.Throwable t)
          Shortcut to Syslog.log().debug(Throwable).
static void error(java.lang.String s)
          Shortcut to Syslog.log().error(String).
static void error(java.lang.Throwable t)
          Shortcut to Syslog.log().error(Throwable).
static LogListener getSystemLogEventPrinter()
          Returns a simple LogListener that prints debug and info LogEvent messages to System.out and other LogEvent messages to System.err.
static void info(java.lang.String s)
          Shortcut to Syslog.log().info(String).
static void info(java.lang.Throwable t)
          Shortcut to Syslog.log().info(Throwable).
static void install()
          When installed, System.out and System.err are redirected to Syslog.log.
static Log log()
          Returns the system Log instance that, by default, only has one LogListener.
static void uninstall()
          Uninstalls by restoring System.out and System.err.
static void warn(java.lang.String s)
          Shortcut to Syslog.log().warn(String).
static void warn(java.lang.Throwable t)
          Shortcut to Syslog.log().warn(Throwable).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

log

public static Log log()
Returns the system Log instance that, by default, only has one LogListener. It prints debug and info LogEvent messages to System.out and other LogEvent messages to System.err.
See Also:
getSystemLogEventPrinter()

getSystemLogEventPrinter

public static LogListener getSystemLogEventPrinter()
Returns a simple LogListener that prints debug and info LogEvent messages to System.out and other LogEvent messages to System.err. Remove this listener to disable printing to System.out and System.err.

install

public static void install()
When installed, System.out and System.err are redirected to Syslog.log. System.out produces info events, and System.err produces error events.

uninstall

public static void uninstall()
Uninstalls by restoring System.out and System.err.

debug

public static void debug(java.lang.String s)
Shortcut to Syslog.log().debug(String).

debug

public static void debug(java.lang.Throwable t)
Shortcut to Syslog.log().debug(Throwable).

info

public static void info(java.lang.String s)
Shortcut to Syslog.log().info(String).

info

public static void info(java.lang.Throwable t)
Shortcut to Syslog.log().info(Throwable).

warn

public static void warn(java.lang.String s)
Shortcut to Syslog.log().warn(String).

warn

public static void warn(java.lang.Throwable t)
Shortcut to Syslog.log().warn(Throwable).

error

public static void error(java.lang.String s)
Shortcut to Syslog.log().error(String).

error

public static void error(java.lang.Throwable t)
Shortcut to Syslog.log().error(Throwable).