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 as setting the level to a value of DEBUG for the logger that is specified in the log event.
    • modify="TRUE|FALSE" specifies whether to modify the configuration file; the default is "FALSE". Set modify="TRUE" to add a new appender, connect a logger to a new or existing appender, remove an appender, or change a logger level. Set modify="FALSE" if you are not modifying the logging configuration file or if you are replacing the configuration file.
      You can use the IOMOPERATE procedure to modify the configuration file. For more information, see “IOMOPERATE Procedure” in SAS Intelligence Platform: Application Server Administration Guide on http://support.sas.com.
  • 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.
    • remove="TRUE|FALSE" specifies whether to remove the appender from the logging configuration file; the default is "FALSE". A value of "TRUE" removes the appender from the logging configuration file. A value of "FALSE" does not remove the appender from the logging configuration file.
      You can use the IOMOPERATE procedure to modify the configuration file. For more information, see “IOMOPERATE Procedure” in SAS Intelligence Platform: Application Server Administration Guide on http://support.sas.com.
  • 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 the name of the message category.
  • Optional attribute:
    • additivity="TRUE | FALSE" specifies whether to pass the log event to loggers in a hierarchy.
    • immutability="TRUE | FALSE" specifies whether settings for additivity and level can be changed by using the SAS language.
  • 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: one
    Note: A root logger is not required for a logging configuration file that is used to modify a logging configuration.
  • Attributes: none
  • optional child elements: number of instances
    • <level>: zero or one
    • <appender-ref>: zero or multiple
<param />
defines a logger, 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. For more information, 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