Sample: XML Logger and Appender

Sample Logger for Auditing SAS Library Access

Here is a sample logger for auditing access to SAS libraries:
<!-- Audit.Data.Dataset.Open logger definition -->

<logger name="Audit.Data.Dataset.Open" additivity="false">
   <appender-ref ref="AuditLibraryFile"/>
   <level value="Trace"/>
</logger>

Sample Appender for Auditing SAS Library Access

Here is a sample appender for auditing access to SAS libraries:
<!-- Audit.Data.Dataset File Appender Defintion -->

<appender name="AuditLibraryFile" class="FileAppender">
   <param name="Append" value="true"/>
   <param name="ImmediateFlush" value="true"/>
   <param name="fileNamePattern" value=
               "SAS-configuration-directory/Lev1/
                SAS-application/server-name/Logs/
                Audit.Library_server_%d_%S{hostname}_%S{pid}.log"/>
   <layout>
      <param name="ConversionPattern"
       value="DateTime=%d Userid=%u Libref=%E{Audit.Dataset.Libref} 
              Engine=%E{Audit.Dataset.Engine} Member=%E{Audit.Dataset.Member}  
              MemberType=%E{Audit.Dataset.Memtype} 
              OpenMode=%E{Audit.Dataset.Openmode} Path=%E{Audit.Dataset.Path}"/>
   </layout>
</appender>