Fix global log level being reset in newly created threads.