When you initialize the SAS Environment Manager Service Architecture Framework, the logging configuration of application servers such as the workspace server is updated to include an ARM log. The ARM log is parsed by the nightly extract, transform, load (ETL) process for the framework. This new log is not included in the default logconfig.trace.xml trace-logging file that is used to create logs for troubleshooting issues. In some cases, you might want to have a log-configuration file that includes both the ARM log configuration and the higher level trace-logging configuration. This note describes how to create such a file for various application servers.
Workspace Servers and SAS/CONNECT® Servers
Complete these steps to create the combined log-configuration file for workspace servers and SAS/CONNECT servers:
- Navigate to the directory of the application server for which you want to create a combined log-configuration file.
Here is an example: SAS-configuration-directory/Levn/SASApp/WorkspaceServer. - Copy the logconfig.trace.xml file to a new file named logconfig.apm.trace.xml.
- From the logconfig.apm.xml file, copy the FileARM4 appender definition XML from <appender name="FileARM4" class="FileAppender"> to </appender>.
Then, paste the definition into your new logconfig.apm.trace.xml file before the final line </logging:configuration>. - Locate the ARM appender section beginning <appender name="ARM" class="ARMAppender"> in new logconfig.apm.trace.xml file.
Then, add the line <appender-ref ref="FileARM4"/> before the </appender> line.
The end result is a new appender definition in your new logconfig.apm.trace.xml file that looks similar to the following:
<appender name="FileARM4" class="FileAppender">
<param name="Append" value="false"/>
<param name="Unique" value="true"/>
<param name="ImmediateFlush" value="true"/>
<param name="FileNamePattern" value="<SAS-configuration-directory>/Levn/SASApp/WorkspaceServer/PerfLogs/arm4_%S{username}_%d{yyyy-MM-dd_HH.mm.ss}_%S{hostname}_%S{pid}.log"/>
<layout>
<param name="ConversionPattern"
value="%d|%c|%56X{ARM.ParentCorrelator}|%56X{ARM.CurrentCorrelator}|%X{ARM2.Record}"/>
</layout>
</appender>
You also see this new line in your existing ARM appender:
<appender name="ARM" class="ARMAppender">
<param name="GetTimes" value="true"/>
<param name="AppName" value="WorkspaceServer"/>
<param name="GroupName" value="SAS"/>
<appender-ref ref="WSLogAppender"/>
<appender-ref ref="FileARM4"/>
</appender>
To confirm the functionality of this new file, you can delete the following option to your application server's sasv9_usermods.cfg file:
-logconfigloc SAS-configuration-directory/Levn/SASApp/WorkspaceServer/logconfig.apm.xml
Replace the deleted option with the following:
-logconfigloc SAS-configuration-directory/Levn/SASApp/WorkspaceServer/logconfig.apm.trace.xml
Then, validate your application server. The validation should succeed with both a trace log created in your log directory and an ARM log file created in the application server's PerfLogs directory.
Stored Process Servers and Pooled Workspace Servers
Complete these steps to create the combined log-configuration file for stored process servers and pooled workspace servers:
- Navigate to the directory of the application server for which you want to create a combined log-configuration file.
Here is an example: SAS-configuration-directory/Levn/SASApp/StoredProcessServer. - Copy the logconfig.trace.xml file to a new file named logconfig.apm.trace.xml.
- From the logconfig.apm.xml file, copy the RollingARM4 appender definition XML from <appender name="RollingARM4" class="RollingFileAppender"> to </appender>.
Then, paste the definition into your new logconfig.apm.trace.xml file before the final line </logging:configuration>. - From the logconfig.apm.xml file, copy the ARM appender definition XML from <appender name="ARM" class="ARMAppender"> to </appender>. Then, paste the definition into your new logconfig.apm.trace.xml file before the final line </logging:configuration>.
- From the logconfig.apm.xml file, copy the Perf.ARM logger definition XML from <logger name="Perf.ARM" additivity="false"> to </logger>. Then, paste the definition into your new logconfig.apm.trace.xml file before the final line </logging:configuration>.
The end result is two new appender definitions in your new logconfig.apm.trace.xml file that look similar to the following:
<appender name="RollingARM4" class="RollingFileAppender">
<param name="Append" value="true"/>
<param name="ImmediateFlush" value="true"/>
<rollingPolicy class="TimeBasedRollingPolicy">
<param name="FileNamePattern" value="<SAS-configuration-directory>/Levn/SASApp/StoredProcessServer/PerfLogs/arm4_STPServer_%d_%S{hostname}_%S{pid}.log"/>
</rollingPolicy>
<layout>
<param name="ConversionPattern" value="%d|%c|%56X{ARM.ParentCorrelator}|%56X{ARM.CurrentCorrelator}|%X{ARM2.Record}"/>
</layout>
</appender>
<appender name="ARM" class="ARMAppender">
<param name="GetTimes" value="true"/>
<param name="AppName" value="StoredProcessServer"/>
<param name="GroupName" value="SAS"/>
<appender-ref ref="RollingARM4"/>
</appender>
You also see a new logger definition:
<logger name="Perf.ARM" additivity="false">
<level value="Info"/>
<appender-ref ref="ARM"/>
</logger>
To confirm the functionality of this new file, you can delete the following option to your application server's sasv9_usermods.cfg file:
-logconfigloc SAS-configuration-directory/Levn/SASApp/StoredProcessServer/logconfig.apm.xml
Replace the deleted option with the following:
-logconfigloc SAS-configuration-directory/Levn/SASApp/StoredProcessServer/logconfig.apm.trace.xml
Then, restart your object spawners and validate your application servers. The validation should succeed with both a trace log created in your log directory and an ARM log file created in the application server's PerfLogs directory.