Move logging of stack frames into Log::logStacktrace().