(
        self,
        fmt=None,
        datefmt=None,
        style="%",
        log_colors=None,
        reset=True,
        secondary_log_colors=None,
        stream=None,
    )
Set the format and colors the LightbusFormatter will use.

        The ``fmt``, ``datefmt`` and ``style`` args are passed on to the
        ``logging.Formatter`` constructor.

        The ``secondary_log_colors`` argument can be used to create additional
        ``log_color`` attributes. Each key in the dictionary will set
        ``{key}_log_color``, using the value to select from a different
        ``log_colors`` set.

        :Parameters:
        - fmt (str): The format string to use
        - datefmt (str): A format string for the date
        - log_colors (dict):
            A mapping of log level names to color names
        - reset (bool):
            Implicitly append a color reset to all records unless False
        - style ('%' or '{' or '$'):
            The format style to use. (*No meaning prior to Python 3.2.*)
        - secondary_log_colors (dict):
            Map secondary ``log_color`` attributes. (*New in version 2.6.*)
Set the format and colors the LightbusFormatter will use.
Set the format and colors the LightbusFormatter will use .
def __init__(
        self,
        fmt=None,
        datefmt=None,
        style="%",
        log_colors=None,
        reset=True,
        secondary_log_colors=None,
        stream=None,
    ):
        """
        Set the format and colors the LightbusFormatter will use.

        The ``fmt``, ``datefmt`` and ``style`` args are passed on to the
        ``logging.Formatter`` constructor.

        The ``secondary_log_colors`` argument can be used to create additional
        ``log_color`` attributes. Each key in the dictionary will set
        ``{key}_log_color``, using the value to select from a different
        ``log_colors`` set.

        :Parameters:
        - fmt (str): The format string to use
        - datefmt (str): A format string for the date
        - log_colors (dict):
            A mapping of log level names to color names
        - reset (bool):
            Implicitly append a color reset to all records unless False
        - style ('%' or '{' or '$'):
            The format style to use. (*No meaning prior to Python 3.2.*)
        - secondary_log_colors (dict):
            Map secondary ``log_color`` attributes. (*New in version 2.6.*)
        """
        if fmt is None:
            fmt = default_formats[style]

        if sys.version_info >= (3, 8):
            # Disable the new validation feature in 3.8, as out dictionary
            # of formats will cause it to error. All this logging needs refactoring
            # anyway.
            extra = dict(validate=False)
        else:
            extra = dict()

        super(LightbusFormatter, self).__init__(fmt, datefmt, style, **extra)

        # Disable reset codes if we do not have a TTY
        self.stream = stream or sys.stdout
        reset = reset and self.stream.isatty()

        self.log_colors = log_colors if log_colors is not None else default_log_colors
        self.secondary_log_colors = secondary_log_colors
        self.reset = reset
        self.style = style
        self.fmt = fmt
def __init__ ( self , fmt = None , datefmt = None , style = "%" , log_colors = None , reset = True , secondary_log_colors = None , stream = None , ) : if fmt is None : fmt = default_formats [ style ] if sys . version_info >= ( 3 , 8 ) : # Disable the new validation feature in 3.8, as out dictionary # of formats will cause it to error. All this logging needs refactoring # anyway. extra = dict ( validate = False ) else : extra = dict ( ) super ( LightbusFormatter , self ) . __init__ ( fmt , datefmt , style , * * extra ) # Disable reset codes if we do not have a TTY self . stream = stream or sys . stdout reset = reset and self . stream . isatty ( ) self . log_colors = log_colors if log_colors is not None else default_log_colors self . secondary_log_colors = secondary_log_colors self . reset = reset self . style = style self . fmt = fmt