Question: I'm using Proc Printto to save the log & output to a directory, which it does quite nicely, however the log is no longer printed in the log window. I still prefer to use the log for debugging. 

```
proc printto 
    print='<directory>\output.lst' 
    log = '<directory>\log.log'
    new; 
run; 

```

(The new option replaces any existing log - works same as replace in other procs)

Many thanks.

Answer: 
-ALTPRINT would do it for the listing output. However if you are in interactive SAS, ODS HTML will generate output if you are using the HTML output window, so it is usually unnecessary. In some operating system, e.g UNIX, LINUX you are able to browse/search the output as it is being written. That is typically the way I do it when working in those OS's.
This article gives a macro that answers my question.
<http://www.lexjansen.com/pharmasug/2002/proceed/coders/cc10.pdf>