Imagine your project has a special variable whose value is a stream to which some output is directed, e.g. my-project:*log-output* . You can change where the output goes by setting the value of the special variable, but by default, output should go to *standard-output* .

The naive way to do this is a direct reference:

(defvar *log-output* *standard-output*)

However, this can run into trouble if *standard-output* is bound to something unexpected when that form is evaluated. For example, if file loading output is temporarily suppressed by binding *standard-output* to (make-broadcast-stream) , output to *log-output* is then also discarded.

One way to work around it is with make-synonym-stream:

(defvar *log-output* (make-synonym-stream '*standard-output*))