Configuring the SAS® Stored Process Server to flush the log file during the execution of a SAS Stored process


When you are troubleshooting problems, it is helpful at times to view the log file while a SAS Stored Process is executing so that you can see the logging for the job steps as they run. However, when the SAS® Stored Process Server executes a SAS® Stored Process, the log is not flushed from the buffer to the physical log file until after the SAS Stored Process completes execution. The log is flushed to the physical log file only if you turn on additional logging.

To turn on additional logging, follow these steps:

  1. Copy the SAS Stored Process Server logconfig.trace.xml file and use it to create a new file called logconfig.trace2.xml.

    Note: You can find the logconfig.trace.xml file in a location that is similar to this directory:

    SAS-configuration-directory/Lev1/SASApp/StoredProcessServer/
  2. Modify the newly created logconfig.trace2.xml file, as follows:
    1. Locate the following elements in the App.Program logger:
      <logger name="App.Program">
      <level value="Fatal"/>
      </logger>
    2. Change the value for the VALUE= parameter from Fatal to Info:
      <logger name="App.Program">
      <level value="Info"/>
      </logger>
  3. Locate the sasv9.cfg file for your SAS Stored Process Server. It should be located in a directory similar to the following:
    SAS-configuration-diectory/Lev1/SASApp/StoredProcessServer/sasv9.cfg
  4. In this file, modify the LOGCONFIGLOC option so that the logconfig.trace2.xml file is referenced rather than the logconfig.xml file.

    -logconfigloc &quotSAS-configuration-directory/Lev1/SASApp/StoredProcessServer/logconfig.trace2.xml"
  5. Restart your SAS® Object Spawner to activate the change.

Note: You should turn on this additional logging only when you are troubleshooting problems because the logging greatly increases the SAS Stored Process Server log file. After you finish troubleshooting the problems, change the logging back to the original settings.