Make log level thread safe