Throw exception for invalid log level.