<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SAS 9.4 Stored Process Log file monitoring in Developers</title>
    <link>https://communities.sas.com/t5/Developers/SAS-9-4-Stored-Process-Log-file-monitoring/m-p/254652#M4852</link>
    <description>&lt;P&gt;The stored process server logging is controled by the log4sas facility. The file that allows you to control this is most likely logconfig.xml (but could be different, under control of the logconfigloc SAS invocation option).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is one parameter that may help you achieve what you want. Add this to logconfig.xml file:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&amp;lt;param name="ImmediateFlush" value="TRUE"/&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Maybe also the SAS option UNBUFLOG will help but I am uncertain how well that plays with log4sas. Seems worth a try. You will not get log lines any faster than that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Be aware of possible trade-offs like additional processing and I/O overhead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
    <pubDate>Sat, 05 Mar 2016 00:01:24 GMT</pubDate>
    <dc:creator>jklaverstijn</dc:creator>
    <dc:date>2016-03-05T00:01:24Z</dc:date>
    <item>
      <title>SAS 9.4 Stored Process Log file monitoring</title>
      <link>https://communities.sas.com/t5/Developers/SAS-9-4-Stored-Process-Log-file-monitoring/m-p/251259#M4850</link>
      <description>&lt;P&gt;I am seeing that the log information from a SAS Stored Process (STP) is appended to the .log file only upon completion of the STP. I want to monitor long running STPs by tailing the STP log file. Is there a way to get SAS to write the log information immediately instead of this delayed behavior?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: I kick off an STP (stp_test.sas) and tail the log file. The last line see is:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;2016-02-19T11:05:03,630 INFO  [00000004] :sassrv - [00000003] STPXUTL Execute using file path:  /SAS/SASHome/SASFoundation/9.4/sasstp/stp_test.sas&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;Only upon completion (53 seconds later) I get the following next lines including specifically the NOTES that are important to me.&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;2016-02-19T11:05:56,634 INFO  [00079501] 8:sasmi - STP: 3: Execution Complete.  Status=4
2016-02-19T11:05:56,678 INFO  [00079501] 8:sasmi - NOTE: %INCLUDE (level 1) file /SAS/SASHome/SASFoundation/9.4/sasstp/stp_test.sas is file /SAS/SASHome/SASFoundation/9.4/sasstp/stp_test.sas.
2016-02-19T11:05:56,679 INFO  [00079501] 8:sasmi - NOTE: PROCEDURE SQL used (Total process time):
2016-02-19T11:05:56,679 INFO  [00079501] 8:sasmi -       real time           0.00 seconds
2016-02-19T11:05:56,679 INFO  [00079501] 8:sasmi -       cpu time            0.01 seconds&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 19:34:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-9-4-Stored-Process-Log-file-monitoring/m-p/251259#M4850</guid>
      <dc:creator>burkheart</dc:creator>
      <dc:date>2016-02-19T19:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Stored Process Log file monitoring</title>
      <link>https://communities.sas.com/t5/Developers/SAS-9-4-Stored-Process-Log-file-monitoring/m-p/251412#M4851</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Maybe I am not the most appropriate person to answer your question, but let me give it a try:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you need additional details on the log, maybe you would like to increase your log level to debug (and/or enable the macro debug options on the code).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Still, this might add too much information on your logs and not the information you expect, because SAS only writes to the log when a procedure is finished or with explicit statements in your code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Said this, and as common programming procedure, what I would really advise you is to include those explicit statements (eg %put statements) to write extra lined on your log or a different log file, if you will&lt;/P&gt;</description>
      <pubDate>Sun, 21 Feb 2016 17:45:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-9-4-Stored-Process-Log-file-monitoring/m-p/251412#M4851</guid>
      <dc:creator>JuanS_OCS</dc:creator>
      <dc:date>2016-02-21T17:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Stored Process Log file monitoring</title>
      <link>https://communities.sas.com/t5/Developers/SAS-9-4-Stored-Process-Log-file-monitoring/m-p/254652#M4852</link>
      <description>&lt;P&gt;The stored process server logging is controled by the log4sas facility. The file that allows you to control this is most likely logconfig.xml (but could be different, under control of the logconfigloc SAS invocation option).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is one parameter that may help you achieve what you want. Add this to logconfig.xml file:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&amp;lt;param name="ImmediateFlush" value="TRUE"/&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Maybe also the SAS option UNBUFLOG will help but I am uncertain how well that plays with log4sas. Seems worth a try. You will not get log lines any faster than that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Be aware of possible trade-offs like additional processing and I/O overhead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Mar 2016 00:01:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-9-4-Stored-Process-Log-file-monitoring/m-p/254652#M4852</guid>
      <dc:creator>jklaverstijn</dc:creator>
      <dc:date>2016-03-05T00:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Stored Process Log file monitoring</title>
      <link>https://communities.sas.com/t5/Developers/SAS-9-4-Stored-Process-Log-file-monitoring/m-p/254703#M4853</link>
      <description>Why do you want to monitor it during execution? There's probably nothing you can do anyway until it ends...?</description>
      <pubDate>Sat, 05 Mar 2016 10:38:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-9-4-Stored-Process-Log-file-monitoring/m-p/254703#M4853</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-03-05T10:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 Stored Process Log file monitoring</title>
      <link>https://communities.sas.com/t5/Developers/SAS-9-4-Stored-Process-Log-file-monitoring/m-p/254734#M4854</link>
      <description>&lt;P&gt;Thanks jklaverstijn for the suggestion. This sounds promising I will try that. In case it does not work I have decorated all STPs to proc printto a unique file name.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Mar 2016 15:57:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-9-4-Stored-Process-Log-file-monitoring/m-p/254734#M4854</guid>
      <dc:creator>burkheart</dc:creator>
      <dc:date>2016-03-05T15:57:46Z</dc:date>
    </item>
  </channel>
</rss>

