I\'d like to save or ignore outputs when I execute a specific function in lisp. I use Emacs and CCL. For example,
(defun foo (x) (format t \"x = ~s~%\" x))
Instead of t as the first argument to format, you can give it an output file stream and your output for that statement will be sent to that file stream.
However having excessive disk I/O will also will increase your running time, hence you can consider having two modes like a debug and a release mode for your program where the debug mode prints all the diagnostic messages and the release mode does not print anything at all.