log level enumeration code simplified