Previous Page | Next Page

Appender Reference

UNXFacilityAppender


UNXFacilityAppender Overview

UNXFacilityAppender is a logging facility appender that supports event logging on UNIX operating systems. UNXFacilityAppender sends event messages to the syslogd logging facility.


UNXFacilityAppender Syntax

<appender class="UNXFacilityAppender" name="LOG">
<param name="facilitycode" value="log_value"/>
<layout>
<param name="ConversionPattern" value="conversion-pattern"/>
</layout>
</appender>

UNXFacilityAppender Syntax Description

name="facilitycode" value="log_value"

The facilitycode configuration option specifies the system facility value that generated the message. It can have any of the following log values:

LOG_USER

specifies that messages that are generated by user processes are logged. LOG_USER is the default value for facilitycode.

LOG_LOCAL0 through LOG_LOCAL7

specifies values that are reserved for use by your site.

For information about the generic elements of the appender syntax, see General Appender Syntax.


UNXFacilityAppender Example

The following example is a typical XML configuration file that specifies UNXFacilityAppender.

<appender class="UNXFacilityAppender" name="LOG">
   <layout>
     <param name="ConversionPattern"
            value="%d %-5p [%t] %c (%F:%L) - %m"/>
   </layout>
</appender>

<root>
   <level value="trace"/>
   <appender-ref ref="LOG"/>
</root>

   


UNXFacilityAppender Diagnostic Levels

The following SAS logging facility's diagnostic levels are sent to the UNIX syslogd logging facility with the specified syslogd priorities:

UNXFacilityAppender Diagnostic Levels
SAS Logging Level syslogd Priority
TRACE, DEBUG debug
INFO info
WARN warning
ERROR err
FATAL crit
no level notice

syslogd priority is sometimes referred to as level in UNIX documentation for syslogd. When you use syslogd priority as a value for the SAS logging level, it specifies the severity of the message. It can also be used to specify the part of the system that generated the message. The following list contains definitions for the SAS logging levels that are listed in the table above:

TRACE, DEBUG

specifies messages that are helpful in debugging a program.

INFO

specifies messages that contain general information.

WARN

specifies messages that contain warnings.

ERROR

specifies messages that identify error conditions.

FATAL

specifies messages that identify critical conditions.

no level

specifies messages that identify conditions that require special attention. These conditions are not error conditions. If you do not specify a SAS logging level, then the syslogd value of notice is the default.


UNXFacilityAppender Usage and Best Practices

UNXFacilityAppender is supported on the Solaris, HP, Linux, and AIX operating systems. The logging facility that these operating systems provide is named syslogd. The syslogd daemon must be running before you can see the output that is sent to it by UNXFacilityAppender. To enable UNXFacilityAppender to communicate with syslogd, make sure that you have an entry in the /etc/syslog.conf file for the user facility, the local0 through local7 facilities, or insert * before you start syslogd. You can also have entries for both the user facility and the local0 through local7 facilities.

Note:   The * specifies all facilities. Use caution when specifying *. It can cause facilities other than user and local0 through local7 to log to the destination.  [cautionend]

These entries should have a format of '<facility>.<priority> <destination>'. The following examples show the formats for entries in the configuration file:

user.info     /tmp/userinfo.log

or

*.info        /tmp/allinfo.log

For more information about syslogd on the UNIX platform that you are using, see the documentation written by that provider.

Previous Page | Next Page | Top of Page