def get_level_value(level):
try:<EOL><INDENT>return int(level)<EOL><DEDENT>except ValueError:<EOL><INDENT>try:<EOL><INDENT>return LEVELS_DICT[level.upper()]<EOL><DEDENT>except KeyError:<EOL><INDENT>logging.warning("<STR_LIT>" % level)<EOL>return None<EOL><DEDENT><DEDENT>
Returns the logging value associated with a particular level name.  The
    argument must be present in LEVELS_DICT or be an integer constant.
    Otherwise None will be returned.