All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Acme.Syslog

java.lang.Object
   |
   +----Acme.Syslog

public class Syslog
extends Object
The Syslog class implements the Unix syslog protocol allowing Java to log messages to the standard syslog files. Care has been taken to preserve as much of the Unix implementation as possible.

To use Syslog, simply create an instance, and use the syslog() method to log your message. The class provides all the expected syslog constants. For example, LOG_ERR is Syslog.LOG_ERR.

Original version by Tim Endres
Fetch the software.
Fetch the entire Acme package.


Variable Index

 o LOG_ALERT
 o LOG_AUTH
 o LOG_CONS
 o LOG_CRIT
 o LOG_CRON
 o LOG_DAEMON
 o LOG_DEBUG
 o LOG_EMERG
 o LOG_ERR
 o LOG_FACMASK
 o LOG_INFO
 o LOG_KERN
 o LOG_LOCAL0
 o LOG_LOCAL1
 o LOG_LOCAL2
 o LOG_LOCAL3
 o LOG_LOCAL4
 o LOG_LOCAL5
 o LOG_LOCAL6
 o LOG_LOCAL7
 o LOG_LPR
 o LOG_MAIL
 o LOG_NDELAY
 o LOG_NEWS
 o LOG_NOTICE
 o LOG_NOWAIT
 o LOG_PID
 o LOG_PRIMASK
 o LOG_SYSLOG
 o LOG_USER
 o LOG_UUCP
 o LOG_WARNING

Constructor Index

 o Syslog(String, int, int)
Creating a Syslog instance is equivalent of the Unix openlog() call.

Method Index

 o syslog(int, String)
Use this method to log your syslog messages.

Variables

 o LOG_EMERG
 public static final int LOG_EMERG
 o LOG_ALERT
 public static final int LOG_ALERT
 o LOG_CRIT
 public static final int LOG_CRIT
 o LOG_ERR
 public static final int LOG_ERR
 o LOG_WARNING
 public static final int LOG_WARNING
 o LOG_NOTICE
 public static final int LOG_NOTICE
 o LOG_INFO
 public static final int LOG_INFO
 o LOG_DEBUG
 public static final int LOG_DEBUG
 o LOG_PRIMASK
 public static final int LOG_PRIMASK
 o LOG_KERN
 public static final int LOG_KERN
 o LOG_USER
 public static final int LOG_USER
 o LOG_MAIL
 public static final int LOG_MAIL
 o LOG_DAEMON
 public static final int LOG_DAEMON
 o LOG_AUTH
 public static final int LOG_AUTH
 o LOG_SYSLOG
 public static final int LOG_SYSLOG
 o LOG_LPR
 public static final int LOG_LPR
 o LOG_NEWS
 public static final int LOG_NEWS
 o LOG_UUCP
 public static final int LOG_UUCP
 o LOG_CRON
 public static final int LOG_CRON
 o LOG_LOCAL0
 public static final int LOG_LOCAL0
 o LOG_LOCAL1
 public static final int LOG_LOCAL1
 o LOG_LOCAL2
 public static final int LOG_LOCAL2
 o LOG_LOCAL3
 public static final int LOG_LOCAL3
 o LOG_LOCAL4
 public static final int LOG_LOCAL4
 o LOG_LOCAL5
 public static final int LOG_LOCAL5
 o LOG_LOCAL6
 public static final int LOG_LOCAL6
 o LOG_LOCAL7
 public static final int LOG_LOCAL7
 o LOG_FACMASK
 public static final int LOG_FACMASK
 o LOG_PID
 public static final int LOG_PID
 o LOG_CONS
 public static final int LOG_CONS
 o LOG_NDELAY
 public static final int LOG_NDELAY
 o LOG_NOWAIT
 public static final int LOG_NOWAIT

Constructors

 o Syslog
 public Syslog(String ident,
               int logopt,
               int facility) throws SyslogException
Creating a Syslog instance is equivalent of the Unix openlog() call.

Throws: SyslogException
if there was a problem

Methods

 o syslog
 public void syslog(int priority,
                    String msg) throws SyslogException
Use this method to log your syslog messages. The facility and level are the same as their Unix counterparts, and the Syslog class provides constants for these fields. The msg is what is actually logged.

Throws: SyslogException
if there was a problem

All Packages  Class Hierarchy  This Package  Previous  Next  Index

ACME Java  ACME Labs