Previous Page | Next Page

ARM Logging

Configuring ARM Logging in a Configuration File

Using the ARM interface, the SAS logging facility, and a configuration file, one or more logs can be created. Each log is a file appender that contains pattern layouts. The file appender is defined in the configuration file. The following syntax creates a file appender:

<appender class="FileAppender" name="LOG">
          <param name="File" value="logs/trace.log"/>
          <param name="Append" value="false"/>
          <layout>
               <param name="ConversionPattern" 
                         value="%d %-5p [%t] %c (%F:%L) - %m"/>
          </layout>
</appender>

For more information about the configuration parameters in the file appender syntax, see Description of ARM Appender Configuration Parameters.

A pattern layout is needed to create the output message format.

    <layout>
              <param name="ConversionPattern"
                    value="%d,
                     %X{App.Name},
                     %X{ARM.GroupName},
                     %X{ARM.TranName},
                     %X{ARM.TranState},
                     %X{ARM.ParentCorrelator},
                     %X{ARM.CurrentCorrelator},
                     %X{ARM.TranStatus},
                     %X{ARM.TranStart.Time},
                     %X{ARM.TranStop.Time},
                     %X{ARM.TranResp.Time}
               "/>
          </layout>

For more information about pattern layouts, see Description of ARM Appender Pattern Layouts.

The following configuration file creates three logs:

<?xml version="1.0"?> 
<logging:configuration xmlns:log4sas="http://www.sas.com/xml/logging/1.0/"

<appender class="FileAppender" name="LOG">
          <param name="File" value="logs/trace.log"/>
          <param name="Append" value="false"/>
          <layout>
               <param name="ConversionPattern" 
                         value="%d %-5p [%t] %c (%F:%L) - %m"/>
          </layout>
</appender>

<appender class="FileAppender" name="ARM2LOG">
          <param name="File" value="logs/arm2.log"/>
          <param name="Append" value="false"/>
          <layout>
               <param name="ConversionPattern "
                          value="%X{ARM2.Record}"/>
          </layout>
</appender>

<appender class="FileAppender" name="ARM4LOG">
          <param name="File" value="logs/arm4.log"/>
          <param name="Append" value="false"/>
          <layout>
              <param name="ConversionPattern"
                    value="%d,
                     %X{App.Name},
                     %X{ARM.GroupName},
                     %X{ARM.TranName},
                     %X{ARM.TranState},
                     %X{ARM.ParentCorrelator},
                     %X{ARM.CurrentCorrelator},
                     %X{ARM.TranStatus},
                     %X{ARM.TranStart.Time},
                     %X{ARM.TranStop.Time},
                     %X{ARM.TranResp.Time}
               "/>
          </layout>
</appender>

<appender class="ARMAppender" name="ARM">
          <param name="GetTimes" value="TRUE"/>
          <appender-ref ref="ARM4LOG"/>
          <appender-ref ref="ARM2LOG"/>
</appender>

<logger name="Perf.ARM" additivity="true">
<level value="all"/>
<appender-ref ref="ARM"/>
</logger>

<root>
<level value="trace"/>
<appender-ref ref="LOG"/>
</root>

</logging:configuration>

Here are the three logs that are created by the configuration file (ARM2.LOG, ARM4.LOG, and TRACE.LOG):

ARM2.LOG

I,1523810344.972000,1,0.062500,0.453125,SAS,
G,1523810344.972000,1,1,SAS,MVA SAS session
S,1523810344.972000,1,1,1,0.062500,0.453125
G,1523810344.972000,1,2,PROCEDURE,PROC START/STOP,PROC_NAME,
      ShortStr,PROC_IO,Count64,PROC_MEM,Count64,PROC_LABEL,LongStr
I,1523810345.566000,2,0.203125,0.734375,OpenCodeARMGTID test w/ user metrics,*
G,1523810345.691000,2,3,OpenCode02,,ShtStr,ShortStr,cnt32,Count32
S,1523810345.831000,2,3,2,0.359375,0.828125
S,1523810345.847000,1,2,3,0.359375,0.828125,DATASTEP,0,0,
P,1523810345.956000,1,2,3,0.375000,0.890625,0,DATASTEP,311110,283296,
S,1523810345.972000,1,2,4,0.375000,0.890625,SORT    ,0,0,
P,1523810346.128000,1,2,4,0.421875,0.953125,0,SORT    ,532806,2103048,
P,1523810346.191000,2,3,2,0.453125,0.984375,0
E,1523810346.238000,2,0.468750,1.000000
P,1523810346.285000,1,1,1,0.468750,1.015625,0
E,1523810346.300000,1,0.484375,1.015625

ARM4.LOG

2008-04-14T12:39:04,972 | SAS | USERID |  | INIT |  |  |  |  |  | 
2008-04-14T12:39:04,972 | SAS | USERID | SAS | REGISTER |  |  |  |  |  | 
2008-04-14T12:39:04,972 | SAS | USERID | SAS | START |  | 
        ACj/ADExOUUzQkI3LUJGQTgtNDlBOS04RTg1LUVDOTJCRTQ2RTY4OA== |  |
        1523810344.972000 |  | 
2008-04-14T12:39:04,972 | SAS | USERID | PROCEDURE | REGISTER |  |  |  |  |  | 
2008-04-14T12:39:05,565 | OpenCodeARMGTID_test_w/_user_metrics | 
        USERID |  | INIT |  |  |  |  |  | 
2008-04-14T12:39:05,690 | OpenCodeARMGTID_test_w/_user_metrics |
        USERID | OpenCode02 | REGISTER |  |  |  |  |  | 
2008-04-14T12:39:05,830 | OpenCodeARMGTID_test_w/_user_metrics | 
        USERID | OpenCode02 | START | ACj/
        ADExOUUzQkI3LUJGQTgtNDlBOS04RTg1LUVDOTJCRTQ2RTY4OA== | 
        ACj/AEY3MjJDNDJCLTAxNkEtNDMxNy1BNzc4LTc2OTA5Mjg1QzRGNQ== |  |
        1523810345.831000 |  | 
2008-04-14T12:39:05,847 | SAS | USERID | PROCEDURE | START | 
        ACj/AEY3MjJDNDJCLTAxNkEtNDMxNy1BNzc4LTc2OTA5Mjg1QzRGNQ== | 
        ACj/AERGNDc3OEFELTlCNzItNEE3NC1CNjNFLTU5OTI2QTFERTQ4Ng== |  | 
        1523810345.847000 |  | 
2008-04-14T12:39:05,955 | SAS | USERID | PROCEDURE | STOP | 
        ACj/AEY3MjJDNDJCLTAxNkEtNDMxNy1BNzc4LTc2OTA5Mjg1QzRGNQ== | 
        ACj/AERGNDc3OEFELTlCNzItNEE3NC1CNjNFLTU5OTI2QTFERTQ4Ng== | 
        GOOD | 1523810345.847000 | 1523810345.956000 | 0.109000
2008-04-14T12:39:05,972 | SAS | USERID | PROCEDURE | START | 
        ACj/AEY3MjJDNDJCLTAxNkEtNDMxNy1BNzc4LTc2OTA5Mjg1QzRGNQ== | 
        ACj/AEQ5QkY3MkE3LTVBMzQtNDg1Qi05MUQyLUI0MjZDMzE2MDk0NA== |  | 
        1523810345.972000 |  | 
2008-04-14T12:39:06,128 | SAS | USERID | PROCEDURE | STOP | 
        ACj/AEY3MjJDNDJCLTAxNkEtNDMxNy1BNzc4LTc2OTA5Mjg1QzRGNQ== | 
        ACj/AEQ5QkY3MkE3LTVBMzQtNDg1Qi05MUQyLUI0MjZDMzE2MDk0NA== | 
        GOOD | 1523810345.972000 | 1523810346.128000 | 0.156000
2008-04-14T12:39:06,190 | OpenCodeARMGTID_test_w/_user_metrics | 
        USERID | OpenCode02 | STOP | 
        ACj/ADExOUUzQkI3LUJGQTgtNDlBOS04RTg1LUVDOTJCRTQ2RTY4OA== | 
        ACj/AEY3MjJDNDJCLTAxNkEtNDMxNy1BNzc4LTc2OTA5Mjg1QzRGNQ== | 
        GOOD | 1523810345.831000 | 1523810346.191000 | 0.360000
2008-04-14T12:39:06,237 | OpenCodeARMGTID_test_w/_user_metrics | 
        USERID |  | TERM |  |  |  |  |  | 
2008-04-14T12:39:06,284 | SAS | USERID | SAS | STOP |  | 
        ACj/ADExOUUzQkI3LUJGQTgtNDlBOS04RTg1LUVDOTJCRTQ2RTY4OA== | 
        GOOD | 1523810344.972000 | 1523810346.285000 | 1.313000
2008-04-14T12:39:06,299 | SAS | USERID |  | TERM |  |  |  |  |  | 

TRACE.LOG

2008-04-14T12:39:04,924 DEBUG [00000003] Logging (l4sasutil.c:830) - 
        Loading the tk4afile support extension (1.0.0).
2008-04-14T12:39:04,924 DEBUG [00000003] Logging.Appender.File 
        (tk4afile.c:1082) - Creating FileAppender LOG
2008-04-14T12:39:04,924 DEBUG [00000003] Logging.Appender.File 
        (tk4afile.c:1082) - Creating FileAppender ARM2LOG
2008-04-14T12:39:04,924 DEBUG [00000003] Logging.Appender.File 
        (tk4afile.c:1082) - Creating FileAppender ARM4LOG
2008-04-14T12:39:04,955 DEBUG [00000003] Logging (l4sasutil.c:830) - 
        Loading the tk4aarm4 support extension (1.0.0).
2008-04-14T12:39:04,955 DEBUG [00000003] Logging.Appender.ARM 
        (tk4aarm4.c:1192) - Creating ARM Appender ARM
2008-04-14T12:39:04,955 DEBUG [00000003] Logging.Appender.ARM 
        (tk4aarm4.c:1345) - Created ARM Appender ARM (0x1fa5f40)
2008-04-14T12:39:04,955 DEBUG [00000003] Logging.Appender.ARM 
        (tk4aarm4.c:947) - ARM Appender SetOption(GetTimes, TRUE)
2008-04-14T12:39:04,972 INFO  [00000003] Perf.ARM.SAS.APPL 
        (tka_api.c:275) - INIT SAS 13eec00 I,1523810344.972000,1,0.062500,
        0.453125,SAS,
2008-04-14T12:39:04,972 INFO  [00000003] Perf.ARM.SAS.APPL 
        (tka_2api.c:576) - REGISTER SAS 13eee58 G,1523810344.972000,1,1,
        SAS,MVA SAS session
2008-04-14T12:39:04,972 INFO  [00000003] Perf.ARM.SAS.APPL 
        (tka_api.c:1107) - START SAS 13eee58 0 S,1523810344.972000,1,1,1,
        0.062500,0.453125
2008-04-14T12:39:04,972 INFO  [00000003] Perf.ARM.SAS.PROC 
        (tka_2api.c:576) - REGISTER PROCEDURE 13ef148 G,1523810344.972000,
        1,2,PROCEDURE,PROC START/STOP,PROC_NAME,ShortStr,
        PROC_IO,Count64,PROC_MEM,Count64,PROC_LABEL,LongStr
2008-04-14T12:39:05,299 INFO  [00000008] App.Program (ynl4sas.c:123) - 1  
         The SAS System               12:39 Monday, April 14, 2008
2008-04-14T12:39:05,299 INFO  [00000008] App.Program (ynl4sas.c:123) - 
2008-04-14T12:39:05,299 INFO  [00000008] App.Program (ynl4sas.c:123) - 
        NOTE: Copyright (c) 2002-2008 by SAS Institute Inc., Cary, NC, USA. 
2008-04-14T12:39:05,299 INFO  [00000008] App.Program (ynl4sas.c:123) - 
        NOTE: SAS (r) Proprietary Software 9.2 (TS2B0) 
2008-04-14T12:39:05,299 INFO  [00000008] App.Program (ynl4sas.c:123) -      
         Licensed to SAS Institute Inc., Site 0000000001.
2008-04-14T12:39:05,299 INFO  [00000008] App.Program (ynl4sas.c:123) - 
        NOTE: This session is executing on the XP_PRO  platform.
2008-04-14T12:39:05,315 INFO  [00000008] App.Program (ynl4sas.c:123) - 
2008-04-14T12:39:05,315 INFO  [00000008] App.Program (ynl4sas.c:123) - 
2008-04-14T12:39:05,315 INFO  [00000008] App.Program (ynl4sas.c:123) - 
...

Previous Page | Next Page | Top of Page