Use atomic operations to change log level.