Fixed a bug of getting an incorrect active log level.