Try exec 2> /tmp/error.log
.
From the manual:
exec [ -c ] [ -a name ] [ arg . . . ]
If
arg
is given,
the command specified by
the arguments is executed in place of this shell
without creating a new process.
The
-c
option causes the environment to be cleared before applying
variable assignments associated with the
exec
invocation.
The
-a
option
causes
name
rather than the first
arg,
to become
argv[0]
for the new process.
Input/output arguments may appear and
affect the current process.
If
arg
is not given,
the effect of this command is to
modify file descriptors
as prescribed by the input/output redirection list.
In this case,
any file descriptor numbers greater than 2 that are
opened with this mechanism are closed when invoking
another program.