java.lang.Objectorg.apache.log4j.AppenderSkeleton
org.apache.log4j.net.SyslogAppender
Use SyslogAppender to send log messages to a remote syslog daemon.
| Field Summary | |
| protected static int | FACILITY_OI | 
| static int | LOG_AUTHsecurity/authorization messages | 
| static int | LOG_AUTHPRIVsecurity/authorization messages (private) | 
| static int | LOG_CRONclock daemon | 
| static int | LOG_DAEMONSystem daemons | 
| static int | LOG_FTPftp daemon | 
| static int | LOG_KERNKernel messages | 
| static int | LOG_LOCAL0reserved for local use | 
| static int | LOG_LOCAL1reserved for local use | 
| static int | LOG_LOCAL2reserved for local use | 
| static int | LOG_LOCAL3reserved for local use | 
| static int | LOG_LOCAL4reserved for local use | 
| static int | LOG_LOCAL5reserved for local use | 
| static int | LOG_LOCAL6reserved for local use | 
| static int | LOG_LOCAL7reserved for local use | 
| static int | LOG_LPRline printer subsystem | 
| static int | LOG_MAILMail system | 
| static int | LOG_NEWSnetwork news subsystem | 
| static int | LOG_SYSLOGmessages generated internally by syslogd | 
| static int | LOG_USERRandom user-level messages | 
| static int | LOG_UUCPUUCP subsystem | 
| protected static int | SYSLOG_HOST_OI | 
| Fields inherited from class org.apache.log4j.AppenderSkeleton | 
| closed, errorHandler, headFilter, layout, name, tailFilter, threshold | 
| Constructor Summary | |
| SyslogAppender() | |
| SyslogAppender(Layout layout,
               int syslogFacility) | |
| SyslogAppender(Layout layout,
               String syslogHost,
               int syslogFacility) | |
| Method Summary | |
|  void | activateOptions()This method returns immediately as options are activated when they are set. | 
|  void | append(LoggingEvent event)Subclasses of AppenderSkeletonshould implement this
     method to perform actual logging. | 
|  void | close()Release any resources held by this SyslogAppender. | 
|  String | getFacility()Returns the value of the Facility option. | 
| static int | getFacility(String facilityName)Returns the integer value corresponding to the named syslog facility, or -1 if it couldn't be recognized. | 
|  boolean | getFacilityPrinting()Returns the value of the FacilityPrinting option. | 
| static String | getFacilityString(int syslogFacility)Returns the specified syslog facility as a lower-case String, e.g. | 
|  String | getSyslogHost()Returns the value of the SyslogHost option. | 
|  boolean | requiresLayout()The SyslogAppender requires a layout. | 
|  void | setFacility(String facilityName)Set the syslog facility. | 
|  void | setFacilityPrinting(boolean on)If the FacilityPrinting option is set to true, the printed message will include the facility name of the application. | 
|  void | setSyslogHost(String syslogHost)The SyslogHost option is the name of the the syslog host where log output should go. | 
| Methods inherited from class org.apache.log4j.AppenderSkeleton | 
| addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold | 
| Methods inherited from class java.lang.Object | 
| clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
public static final int LOG_KERN
public static final int LOG_USER
public static final int LOG_MAIL
public static final int LOG_DAEMON
public static final int LOG_AUTH
public static final int LOG_SYSLOG
public static final int LOG_LPR
public static final int LOG_NEWS
public static final int LOG_UUCP
public static final int LOG_CRON
public static final int LOG_AUTHPRIV
public static final int LOG_FTP
public static final int LOG_LOCAL0
public static final int LOG_LOCAL1
public static final int LOG_LOCAL2
public static final int LOG_LOCAL3
public static final int LOG_LOCAL4
public static final int LOG_LOCAL5
public static final int LOG_LOCAL6
public static final int LOG_LOCAL7
protected static final int SYSLOG_HOST_OI
protected static final int FACILITY_OI
| Constructor Detail | 
public SyslogAppender()
public SyslogAppender(Layout layout,
                      int syslogFacility)
public SyslogAppender(Layout layout,
                      String syslogHost,
                      int syslogFacility)
| Method Detail | 
public void close()
public static String getFacilityString(int syslogFacility)
public static int getFacility(String facilityName)
facilityName - one of the strings KERN, USER, MAIL, DAEMON,
            AUTH, SYSLOG, LPR, NEWS, UUCP, CRON, AUTHPRIV, FTP, LOCAL0,
            LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
            The matching is case-insensitive.public void append(LoggingEvent event)
AppenderSkeletonAppenderSkeleton should implement this
     method to perform actual logging. See also AppenderSkeleton.doAppend method.
append in class AppenderSkeletonpublic void activateOptions()
activateOptions in interface OptionHandleractivateOptions in class AppenderSkeletonpublic boolean requiresLayout()
true.
public void setSyslogHost(String syslogHost)
public String getSyslogHost()
public void setFacility(String facilityName)
The facilityName parameter must be one of the
     strings KERN, USER, MAIL, DAEMON, AUTH, SYSLOG, LPR, NEWS, UUCP,
     CRON, AUTHPRIV, FTP, LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4,
     LOCAL5, LOCAL6, LOCAL7. Case is unimportant.
public String getFacility()
public void setFacilityPrinting(boolean on)
public boolean getFacilityPrinting()
Copyright © 2000 Micro Focus International Limited.  All rights reserved.  
This document and the proprietary marks and names used herein are protected by international law.