--errors=filename
where:
filenameis the name of the file to which errors are to be
redirected.
Diagnostics that relate to problems with the command options
are not redirected, for example, if you type an option name incorrectly.
However, if you specify an invalid argument to an option, for example --cpu=999,
the related diagnostic is redirected to the specified filename.