Currently we don't get any extra info out of vncviewer when we specify -d 5. We should probably add "-Log *:stderr:100" to vncviewer in order to get more info.
It might not be the best idea to add this to -d 5 as you will get sensitive things like key pressing in the log at that point. But this kind of debug output is sometimes needed to solve some issues, so perhaps we need another mechanism to get full logging?