How to use exec and tee to redirect logs to stdout and a log file in the same time

You probably need to run it in bash.
It does not work either if I run it through bash script:

honzhan@hz_BSD10:~/CodeTest/Shell % sh 2: Syntax error: redirection unexpected (expecting word)
honzhan@hz_BSD10:~/CodeTest/Shell % cat
exec &> >(tee -a log.txt)
Not your question, but in case you have to quickly unbashify something,
...lotsa commands...
) | tee log
does more or less the same

You'd expect exec | command would work like exec > file. Hmh...