Hide a bunch of debug logging statements in #ifdef SHOW_DEBUG to prevent spinning a mutex in hot paths.