Syslog: White Paper FAQ Examples JavaDoc
Protomatter Classes v1.1.6

com.protomatter.syslog
Class Channel

java.lang.Object
  |
  +--com.protomatter.syslog.Channel

public class Channel
extends java.lang.Object

A utility class for writing log messages to channels. Common usage of this class is as follows:

Basically, rather than using the infoToChannel(...) method and others on Syslog, you can simply get a handle to a channel and call methods on it.


Field Summary
static Channel ALL
          A static utility field, which is the "all" channel.
static Channel DEFAULT
          A static utility field, which is the "default" channel.
 
Method Summary
 void debug(java.lang.Object logger, java.lang.Object message)
          Log a debug message.
 void debug(java.lang.Object logger, java.lang.Object message, java.lang.Object detail)
          Log a debug message.
 void error(java.lang.Object logger, java.lang.Object message)
          Log an error message.
 void error(java.lang.Object logger, java.lang.Object message, java.lang.Object detail)
          Log an error message.
 void fatal(java.lang.Object logger, java.lang.Object message)
          Log a fatal message.
 void fatal(java.lang.Object logger, java.lang.Object message, java.lang.Object detail)
          Log a fatal message.
static Channel getAllChannel()
          Get a Channel object for the "all" channel.
static Channel getChannel(java.lang.String channelName)
          Get a Channel object for the given channel name.
static Channel getDefaultChannel()
          Get a Channel object for the default channel.
 void info(java.lang.Object logger, java.lang.Object message)
          Log an info message.
 void info(java.lang.Object logger, java.lang.Object message, java.lang.Object detail)
          Log an info message.
 void log(java.lang.Object logger, java.lang.Object message, java.lang.Object detail, int level)
          Log a message.
 void log(java.lang.Object logger, java.lang.Throwable exception)
          Log a message about the given exception.
 void warning(java.lang.Object logger, java.lang.Object message)
          Log a warning message.
 void warning(java.lang.Object logger, java.lang.Object message, java.lang.Object detail)
          Log a warning message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL

public static final Channel ALL
A static utility field, which is the "all" channel.

DEFAULT

public static final Channel DEFAULT
A static utility field, which is the "default" channel.
Method Detail

getChannel

public static Channel getChannel(java.lang.String channelName)
Get a Channel object for the given channel name.

getAllChannel

public static Channel getAllChannel()
Get a Channel object for the "all" channel.

getDefaultChannel

public static Channel getDefaultChannel()
Get a Channel object for the default channel.

debug

public void debug(java.lang.Object logger,
                  java.lang.Object message)
Log a debug message.

debug

public void debug(java.lang.Object logger,
                  java.lang.Object message,
                  java.lang.Object detail)
Log a debug message.

info

public void info(java.lang.Object logger,
                 java.lang.Object message)
Log an info message.

info

public void info(java.lang.Object logger,
                 java.lang.Object message,
                 java.lang.Object detail)
Log an info message.

warning

public void warning(java.lang.Object logger,
                    java.lang.Object message)
Log a warning message.

warning

public void warning(java.lang.Object logger,
                    java.lang.Object message,
                    java.lang.Object detail)
Log a warning message.

error

public void error(java.lang.Object logger,
                  java.lang.Object message)
Log an error message.

error

public void error(java.lang.Object logger,
                  java.lang.Object message,
                  java.lang.Object detail)
Log an error message.

fatal

public void fatal(java.lang.Object logger,
                  java.lang.Object message)
Log a fatal message.

fatal

public void fatal(java.lang.Object logger,
                  java.lang.Object message,
                  java.lang.Object detail)
Log a fatal message.

log

public void log(java.lang.Object logger,
                java.lang.Throwable exception)
Log a message about the given exception. The toString() method on the exception is used as the log message. A stack trace from the exception is used as the message detail, and the message is logged at the ERROR level.

log

public void log(java.lang.Object logger,
                java.lang.Object message,
                java.lang.Object detail,
                int level)
Log a message.

Protomatter Classes v1.1.6
Copyright 1998-2001 Nate Sammons

Protomatter Classes v1.1.6 http://protomatter.sourceforge.net/1.1.6