Syslog White Paper FAQ Examples JavaDoc Classloader
Protomatter Software v1.1.7

com.protomatter.syslog
Interface Syslogger

All Known Implementing Classes:
BasicLogger

public interface Syslogger

An interface for objects that will log things using the Syslog facility.


Method Summary
 void flush()
          Flush the given logger's output.
 java.lang.String getName()
          Get the name of this logger.
 LogPolicy getPolicy()
          Get the log policy used by this logger.
 SyslogTextFormatter getTextFormatter()
          Get the log formatter object used by this logger.
 void log(SyslogMessage message)
          Log an entry to the log.
 boolean mightLog(java.lang.Object logger, int level, java.lang.String channel)
          Determine if it's likely that a message at the given level on the given channel(s) will be logged.
 void setName(java.lang.String name)
          Set the name of this logger.
 void setPolicy(LogPolicy policy)
          Set the log policy used by this logger.
 void setTextFormatter(SyslogTextFormatter formatter)
          Set the log formatter object used by this logger.
 void shutdown()
          Shutdown this logger.
 

Method Detail

log

public void log(SyslogMessage message)
Log an entry to the log.

setName

public void setName(java.lang.String name)
Set the name of this logger.

getName

public java.lang.String getName()
Get the name of this logger.

shutdown

public void shutdown()
Shutdown this logger. The implementation should clean up any resources it has allocated, etc. After this method is called, no more log messages will be sent to this logger.

mightLog

public boolean mightLog(java.lang.Object logger,
                        int level,
                        java.lang.String channel)
Determine if it's likely that a message at the given level on the given channel(s) will be logged. This covers about 99% of the cases where people need to use the Syslog.canXXX() methods. It's still possible that this method would return true even though the logger would ignore the message for some other reason. You can't please all the people all the time.

setPolicy

public void setPolicy(LogPolicy policy)
Set the log policy used by this logger.

getPolicy

public LogPolicy getPolicy()
Get the log policy used by this logger.

setTextFormatter

public void setTextFormatter(SyslogTextFormatter formatter)
Set the log formatter object used by this logger.

getTextFormatter

public SyslogTextFormatter getTextFormatter()
Get the log formatter object used by this logger.

flush

public void flush()
Flush the given logger's output.

Protomatter Software v1.1.7
Copyright 1998-2002 Nate Sammons

Protomatter Software v1.1.7 http://protomatter.sourceforge.net/1.1.7