How to redirect trace output to a file
<p>I am tracing a prolog program</p>

<pre><code>1 ?- trace.
true.

[trace] 1 ?- solve.
   Call: (7) solve ? 
</code></pre>

<p>I also tried </p>

<pre><code>tell('trace_op.txt').
</code></pre>

<p>the file is created but empty</p>

<p>Now the trace is really many lines . I want to redirect the output to a file
Can we redirect it to a file ?</p>