Alexander Burger <a...@software-lab.de> writes:

> On Tue, Feb 25, 2014 at 05:01:21PM +0100, Alexander Burger wrote:
>> One simple way is to use 'err' around your program to redirect standard
>> error
>> 
>>    (err "myLog.txt"
>>       (main) )
>> 
>> and then use the normal 'trace' and 'msg' functions which print to
>> standard error.
>
> or, of course, start the whole program with redirection:
>
>    $ pil myProgram.l ... -main ... +  2>err

but it would be nice to have a function pair (log and unlog) that does
all this: 

 - trace the function
 - redirect the output of trace to a file too
 - untrace and go back to default stderr

something like this

#+begin_src picolisp
  (de log (Func)
     (err (tmp "log")
        (trace Func)
        (pass Func) ) )  
#+end_src

but this does not work unfortunately...

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to