def __init__(self, *args, **kwds): _get_logging().Formatter.__init__(self, *args, **kwds) fg = ColourText.Foreground() fx = ColourText.Effects() self.colours = {_get_logging().INFO: fx.normal, _get_logging().WARNING: fg.orange, _get_logging().ERROR: fg.red, _get_logging().CRITICAL: fg.red, _get_logging().DEBUG: fx.normal} self.markup = ColourText.ANSIMarkup()
def setColour(self, yes): """ Boolean set for if teh colours should be used""" if yes: self.markup = ColourText.ANSIMarkup() else: self.markup = ColourText.NoMarkup()
def setColour(self, yes): if yes: self.markup = ColourText.ANSIMarkup() else: self.markup = ColourText.NoMarkup()