org.apache.avalon.logging.logkit.factory.syslog
Class SyslogTarget

java.lang.Object
  extended byorg.apache.log.output.AbstractTarget
      extended byorg.apache.log.output.AbstractOutputTarget
          extended byorg.apache.log.output.net.DatagramOutputTarget
              extended byorg.apache.avalon.logging.logkit.factory.syslog.SyslogTarget
All Implemented Interfaces:
Closeable, ErrorAware, LogTarget

public class SyslogTarget
extends DatagramOutputTarget

Version:
1.0
Author:
Avalon Development Team

Field Summary
static int LOG_AUTH
          security/authorization messages
static int LOG_AUTHPRIV
          security/authorization messages (private)
static int LOG_CRON
          clock daemon
static int LOG_DAEMON
          System daemons
static int LOG_FTP
          ftp daemon
static int LOG_KERN
          Kernel messages
static int LOG_LOCAL0
          reserved for local use
static int LOG_LOCAL1
          reserved for local use
static int LOG_LOCAL2
          reserved for local use
static int LOG_LOCAL3
          reserved for local use
static int LOG_LOCAL4
          reserved for local use
static int LOG_LOCAL5
          reserved for local use
static int LOG_LOCAL6
          reserved for local use
static int LOG_LOCAL7
          reserved for local use
static int LOG_LPR
          line printer subsystem
static int LOG_MAIL
          Mail system
static int LOG_NEWS
          network news subsystem
static int LOG_SYSLOG
          messages generated internally by syslogd
static int LOG_USER
          Random user-level messages
static int LOG_UUCP
          UUCP subsystem
static int SYSLOG_DEBUG
           
static int SYSLOG_ERROR
           
static int SYSLOG_FATAL
           
static int SYSLOG_INFO
           
static int SYSLOG_WARN
           
 
Constructor Summary
SyslogTarget(InetAddress address, int port)
          Create a output target with end point specified by address and port.
SyslogTarget(InetAddress address, int port, Formatter formatter)
          Create a output target with end point specified by address and port.
SyslogTarget(InetAddress address, int port, Formatter formatter, int facility)
          Create a output target with end point specified by address and port.
 
Method Summary
protected  void doProcessEvent(LogEvent event)
           
 int getFacility()
           
static int getFacilityValue(String name)
           
 void setFacility(int value)
           
 void setFacility(String name)
           
 
Methods inherited from class org.apache.log.output.net.DatagramOutputTarget
close, write
 
Methods inherited from class org.apache.log.output.AbstractOutputTarget
getFormatter, open
 
Methods inherited from class org.apache.log.output.AbstractTarget
getErrorHandler, isOpen, processEvent, setErrorHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_KERN

public static final int LOG_KERN
Kernel messages

See Also:
Constant Field Values

LOG_USER

public static final int LOG_USER
Random user-level messages

See Also:
Constant Field Values

LOG_MAIL

public static final int LOG_MAIL
Mail system

See Also:
Constant Field Values

LOG_DAEMON

public static final int LOG_DAEMON
System daemons

See Also:
Constant Field Values

LOG_AUTH

public static final int LOG_AUTH
security/authorization messages

See Also:
Constant Field Values

LOG_SYSLOG

public static final int LOG_SYSLOG
messages generated internally by syslogd

See Also:
Constant Field Values

LOG_LPR

public static final int LOG_LPR
line printer subsystem

See Also:
Constant Field Values

LOG_NEWS

public static final int LOG_NEWS
network news subsystem

See Also:
Constant Field Values

LOG_UUCP

public static final int LOG_UUCP
UUCP subsystem

See Also:
Constant Field Values

LOG_CRON

public static final int LOG_CRON
clock daemon

See Also:
Constant Field Values

LOG_AUTHPRIV

public static final int LOG_AUTHPRIV
security/authorization messages (private)

See Also:
Constant Field Values

LOG_FTP

public static final int LOG_FTP
ftp daemon

See Also:
Constant Field Values

LOG_LOCAL0

public static final int LOG_LOCAL0
reserved for local use

See Also:
Constant Field Values

LOG_LOCAL1

public static final int LOG_LOCAL1
reserved for local use

See Also:
Constant Field Values

LOG_LOCAL2

public static final int LOG_LOCAL2
reserved for local use

See Also:
Constant Field Values

LOG_LOCAL3

public static final int LOG_LOCAL3
reserved for local use

See Also:
Constant Field Values

LOG_LOCAL4

public static final int LOG_LOCAL4
reserved for local use

See Also:
Constant Field Values

LOG_LOCAL5

public static final int LOG_LOCAL5
reserved for local use

See Also:
Constant Field Values

LOG_LOCAL6

public static final int LOG_LOCAL6
reserved for local use

See Also:
Constant Field Values

LOG_LOCAL7

public static final int LOG_LOCAL7
reserved for local use

See Also:
Constant Field Values

SYSLOG_FATAL

public static final int SYSLOG_FATAL
See Also:
Constant Field Values

SYSLOG_ERROR

public static final int SYSLOG_ERROR
See Also:
Constant Field Values

SYSLOG_WARN

public static final int SYSLOG_WARN
See Also:
Constant Field Values

SYSLOG_INFO

public static final int SYSLOG_INFO
See Also:
Constant Field Values

SYSLOG_DEBUG

public static final int SYSLOG_DEBUG
See Also:
Constant Field Values
Constructor Detail

SyslogTarget

public SyslogTarget(InetAddress address,
                    int port,
                    Formatter formatter,
                    int facility)
             throws IOException
Create a output target with end point specified by address and port.

Parameters:
address - the address endpoint
port - the address port
Throws:
IOException - if an error occurs

SyslogTarget

public SyslogTarget(InetAddress address,
                    int port,
                    Formatter formatter)
             throws IOException
Create a output target with end point specified by address and port.

Parameters:
address - the address endpoint
port - the address port
Throws:
IOException - if an error occurs

SyslogTarget

public SyslogTarget(InetAddress address,
                    int port)
             throws IOException
Create a output target with end point specified by address and port.

Parameters:
address - the address endpoint
port - the address port
Throws:
IOException - if an error occurs
Method Detail

doProcessEvent

protected void doProcessEvent(LogEvent event)

getFacilityValue

public static int getFacilityValue(String name)

setFacility

public void setFacility(String name)

setFacility

public void setFacility(int value)

getFacility

public int getFacility()


Copyright © The Apache Software Foundation. All Rights Reserved.