def __init__(self, fmt=None, datefmt=None, style='<STR_LIT:%>',<EOL>log_colors=None, reset=True,<EOL>secondary_log_colors=None):
if sys.version_info > (<NUM_LIT:2>, <NUM_LIT:7>):<EOL><INDENT>super(LevelFormatter, self).__init__(<EOL>fmt=fmt, datefmt=datefmt, style=style, log_colors=log_colors,<EOL>reset=reset, secondary_log_colors=secondary_log_colors)<EOL><DEDENT>else:<EOL><INDENT>ColoredFormatter.__init__(<EOL>self, fmt=fmt, datefmt=datefmt, style=style,<EOL>log_colors=log_colors, reset=reset,<EOL>secondary_log_colors=secondary_log_colors)<EOL><DEDENT>self.style = style<EOL>self.fmt = fmt<EOL>
Set the per-loglevel format that will be used.

Supports fmt as a dict. All other args are passed on to the
``colorlog.ColoredFormatter`` constructor.

:Parameters:
- fmt (dict):
    A mapping of log levels (represented as strings, e.g. 'WARNING') to
    different formatters. (*New in version 2.7.0)
(All other parameters are the same as in colorlog.ColoredFormatter)

Example:

formatter = colorlog.LevelFormatter(fmt={
    'DEBUG':'%(log_color)s%(msg)s (%(module)s:%(lineno)d)',
    'INFO': '%(log_color)s%(msg)s',
    'WARNING': '%(log_color)sWARN: %(msg)s (%(module)s:%(lineno)d)',
    'ERROR': '%(log_color)sERROR: %(msg)s (%(module)s:%(lineno)d)',
    'CRITICAL': '%(log_color)sCRIT: %(msg)s (%(module)s:%(lineno)d)',
})