(self, log_colors, level_name)
return parse_colors(log_colors.get(level_name, ""))
Return escape codes from a ``log_colors`` dict.
Return escape codes from a ``log_colors`` dict.
Return escape codes from a log_colors dict .
def color(self, log_colors, level_name):
        """Return escape codes from a ``log_colors`` dict."""
        # Don't color log records if do not have a TTY
        if not self.stream.isatty():
            log_colors = {}
        return parse_colors(log_colors.get(level_name, ""))
def color ( self , log_colors , level_name ) : # Don't color log records if do not have a TTY if not self . stream . isatty ( ) : log_colors = { } return parse_colors ( log_colors . get ( level_name , "" ) )