SAS Logging Facility Configuration File |
The following SAS logging facility configuration file represents a possible SAS logging facility XML configuration, which contains specifications for the ARM appender. The file is customized using standard XML language syntax, and includes the following definitions or parameters:
<appender> statement: creates an instance of an appender
<logger> statement: creates a named logger to receive SAS logging facility events
<root> statement: by default, a root logger is required and it receives all SAS logging facility messages
<appender-ref> statement: references an appender, used in a <logger> or <appender> definition
<param> statement: optional parameter definitions for an appender, can be used for unique appender options or output format specifications
Class="<value>" statement: defines a type of appender, such as FileAppender or ARMAppender
%d, %c, %m, %X specifications: optional pattern conversion specifiers that map to the SAS logging facility values; see SAS Logging: Configuration and Programming Reference for a complete range and description of format specifiers.
Note: XML is case sensitive.
<?xml version="1.0" encoding="UTF-8"?> <logging:configuration xmlns:logging="http://www.sas.com/xml/logging/1.0/"> <appender class="FileAppender" name="ARM2LOG"> <param name="File" value="arm2.log"/> <param name="ImmediateFlush" value="true"/> <layout> <param name="ConversionPattern" value="%X{ARM2.Record}"/> </layout> </appender> <appender name="ARM4LOG" class="FileAppender"> <param name="File" value="arm4.log"/> <param name="ImmediateFlush" value="true"/> <layout> <param name="ConversionPattern" value="%d, %12X{App.Name}, %14X{ARM.GroupName}, %12X{ARM.TranName}, %8X{ARM.TranState}, %8X{ARM.TranStatus}, %20X{ARM.TranStart.Time}, %20X{ARM.TranStop.Time}, %56X{ARM.ParentCorrelator}, %56X{ARM.CurrentCorrelator} "/> </layout> </appender> <appender class="ARMAppender" name="ARM"> <param name="Encoding" value="UTF-8"/> <param name="GetTimes" value="true"/> <param name="ManageCorrelators" value="true"/> <param name="AppName" value="yourSampleApp"/> <param name="GroupName" value="SAS"/> <appender-ref ref="ARM4LOG"/> <appender-ref ref="ARM2LOG"/> </appender> <appender class="FileAppender" name="LOG"> <param name="File" value="root.log"/> <param name="ImmediateFlush" value="true"/> <layout> <param name="ConversionPattern" value="%d{yyyyMMdd:HH.mm.ss,SS} %c %m"/> <layout> </appender> <logger name="Perf.ARM" additivity="false"> <level value="info"/> <appender-ref ref="ARM"/> </logger> <root> <level value="info"/> <appender-ref ref="LOG"/> </root> </logging:configuration>
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.