Previous Page | Next Page

Overview of the Logging Configuration File

XML Elements for Configuring SAS Logging

You use <?xml?> and <logging:configuration> elements as the first XML elements in the configuration file to specify XML attributes and the SAS logging message category.

The <appender>, <logger>, and <root> elements define the loggers and appenders.

The <param>, <layout>, <level>, <filter>, and <appender-ref> elements are child elements that customize appender and logger definitions .

The following table summarizes the XML DTD for SAS logging:

SAS Logging XML Configuration Elements
Element Name and Description Element Characteristics
<?xml ?>

is the first XML element in the configuration file

  • Number of instances: one

  • Required attributes:

    • version="1.0"

  • Optional attributes:

    • encoding= "encoding-specification " specifies a language encoding. For more information, see the SAS National Language Support (NLS): Reference Guide.

<logging:configuration>

defines the logging message category and the message category default values

</logging:configuration>

  • Number of instances: one

  • Required attributes:

    • xmlns:logging="http://support.sas.com/xml/logging/1.0/"

  • Optional attributes:

    • threshold="level" specifies the default message threshold for filtering log messages; the default is null, two double quotation marks with no space between them (""). For a list of levels, see Logging Thresholds.

    • debug="TRUE|FALSE" specifies whether to run in debug mode; the default is "FALSE". Setting a value of TRUE is the same is setting the level to a value of DEBUG for the logger that is specified in the log event.

  • Optional child elements: number of instances

    • <appender>: zero or more

    • <logger>: zero or more

    • <root>: zero or one

<appender>

defines a destination for log messages, filters to limit log messages, and the format of the log message

</appender>

  • Number of instances: zero or multiple

  • Required attributes:

    • name="appender-name" is a user-defined name for the appender.

    • class="class-name " specifies the type of appender (For more information, see SAS Appenders for Server Logging).

  • Optional child elements: number of instances

    • <param>: zero or multiple

    • <layout>: zero or one

    • <filter>: zero or multiple

    • <appender-ref>: zero or multiple

    • <rollingPolicy>: zero or one; required when the appender class is RollingFileAppender; otherwise, do not include this element.

<logger>

names a message category, references an appender, and defines a message threshold

</logger>

  • Number of instances: zero or multiple

  • Required attribute:

    • name="logger-name" is a user-defined logger name.

  • Optional attribute:

    • additivity="TRUE | FALSE" specifies whether to pass the log event to loggers in a hierarchy.

  • Optional child elements: number of instances

    • <level>: zero or multiple

    • <appender-ref>: zero or multiple

<root>

a fixed SAS logger and the highest logger in any logging hierarchy

</root>

  • Number of instances: zero or one

  • Attributes: none

  • optional child elements: number of instances

    • <level>: zero or one

    • <appender-ref>: zero or multiple

<param />

defines an appender or a filter parameter and a parameter value

  • Number of instances: zero or multiple

  • Required attributes:

    • name="attribute-name" specifies the literal name of an attribute.

    • value="attribute-value" specifies either a literal or user-supplied value.

<layout>

specifies conversion-pattern layouts

</layout>

  • Number of instances: zero or one

  • Optional child element: number of instances

    • <param>: zero or multiple

<level>

defines the message threshold that a logger accepts

  • Number of instances: zero or one

  • Required attribute:

    • value="level" specifies a message threshold for filtering log events; by default, a level is inherited from the parent logger (For more information, see Logging Thresholds).

<filter>

specifies message-filtering values

</filter>

  • Number of instances: zero or one

  • Required attribute:

    • class="filter-class" specifies the name of the filter (see Message Filtering).

    • Optional child element: instances

      • <param>: zero or multiple


<appender-ref>

names an appender for processing a log event

</appender-ref>

  • Number of instances: zero or multiple

  • Required attribute:

    • ref="appender-name" specifies a user-defined appender name


Previous Page | Next Page | Top of Page