From: Xiao-mei Zhou
Subject: A question about saving program running output
Date: 
Message-ID: <1992Oct2.113209.21418@news.Hawaii.Edu>
Dear Lisp Experters,

I have a question. I would appreciate if you can e-mail
me the answer or tell me where I can find the information.

Thanks very much.

The question is: Is there some easy way to re-direct the 
program's running output to a file ? I could change all the
terminal print sentences (format t) to file print (format stream).
But that seems too much trouble. I am wondering there might
have a system function to do it.

I am using Allegro CL 4.1 on SPARC.

With Respect,

- Mei

···@wiliki.eng.hawaii.edu
From: Bill York
Subject: Re: A question about saving program running output
Date: 
Message-ID: <YORK.92Oct5105856@oakland-hills.lucid.com>
In article <·····················@news.Hawaii.Edu> ···@wiliki.eng.hawaii.edu (Xiao-mei Zhou) writes:

   The question is: Is there some easy way to re-direct the 
   program's running output to a file ? I could change all the
   terminal print sentences (format t) to file print (format stream).
   But that seems too much trouble. I am wondering there might
   have a system function to do it.

You can bind *STANDARD-OUTPUT* to a file stream:

(with-open-file (file-stream "my-file" :direction ':output)
  (let ((*standard-output* file-stream))
    (my-function-which-does-format-T)))