<?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 EG log BOTH in Log window and external file in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-log-BOTH-in-Log-window-and-external-file/m-p/792225#M40189</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How could we put the log in both log window and external file when we run a program in EG?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in Advance!&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jan 2022 16:46:58 GMT</pubDate>
    <dc:creator>Mushy</dc:creator>
    <dc:date>2022-01-25T16:46:58Z</dc:date>
    <item>
      <title>EG log BOTH in Log window and external file</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-log-BOTH-in-Log-window-and-external-file/m-p/792225#M40189</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How could we put the log in both log window and external file when we run a program in EG?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in Advance!&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 16:46:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-log-BOTH-in-Log-window-and-external-file/m-p/792225#M40189</guid>
      <dc:creator>Mushy</dc:creator>
      <dc:date>2022-01-25T16:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: EG log BOTH in Log window and external file</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-log-BOTH-in-Log-window-and-external-file/m-p/792291#M40190</link>
      <description>&lt;P&gt;It would be nice if this was as easy as specifying the ALTLOG option to write the log to a file.&amp;nbsp; Unfortunately, you can't specify ALTLOG during a SAS session.&amp;nbsp; If you think SAS should change that, please upvote:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SASware-Ballot-Ideas/Allow-ALTLOG-to-be-specified-on-OPTIONS-statement/idi-p/219628" target="_blank"&gt;https://communities.sas.com/t5/SASware-Ballot-Ideas/Allow-ALTLOG-to-be-specified-on-OPTIONS-statement/idi-p/219628&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That said, a workaround I sometimes use it to use PROC PRINTTO to send the log to a file, then when I want to see the log I set PROC PRINTTO back to log=log, and stream the logfile back to the log window.&amp;nbsp; Something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*send log to file ;
filename logfile "%sysfunc(pathname(work))/mylog.log" ;
proc printto log=logfile new ;
run ;

*main stuff;
proc means data=sashelp.shoes ;
run ;

*read the log back into the log window ;
proc printto log=log;
run;

data _null_;
  infile logfile;
  input;
  putlog _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 19:52:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-log-BOTH-in-Log-window-and-external-file/m-p/792291#M40190</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2022-01-25T19:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: EG log BOTH in Log window and external file</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-log-BOTH-in-Log-window-and-external-file/m-p/792382#M40192</link>
      <description>&lt;P&gt;Hi Quentin,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mushy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 08:31:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-log-BOTH-in-Log-window-and-external-file/m-p/792382#M40192</guid>
      <dc:creator>Mushy</dc:creator>
      <dc:date>2022-01-26T08:31:56Z</dc:date>
    </item>
  </channel>
</rss>

