trace - redirect command output to file

yosys> help trace

trace cmd
Execute the specified command, logging all changes the command performs on
the design in real time.