def generateRow(self, state): fmt = tools.color(5) + "%s=" + tools.nocolor() + "%s"; sep = tools.color(5) + ", " + tools.nocolor() row = [] for mc in self.columns: values = mc.func(state) if type(values) != tuple: values = (values,) for n, col in enumerate(mc.columns): row.append(fmt % (col.id, col.fmt % values[n])) return sep.join(row)
def generateRow(self, state): fmt = tools.color(5) + "%s=" + tools.nocolor() + "%s" sep = tools.color(5) + ", " + tools.nocolor() row = [] for mc in self.columns: values = mc.func(state) if type(values) != tuple: values = (values, ) for n, col in enumerate(mc.columns): row.append(fmt % (col.id, col.fmt % values[n])) return sep.join(row)
def format(self, record): msg_str = logging.Formatter.format(self, record) time_str = logging.Formatter.formatTime(self, record, self.date_fmt) col = self.color_map.get(record.levelno, 6) return "".join( [tools.color(col), time_str, " - ", msg_str, tools.nocolor()])
def generateRow(self, state): first = True fmt = tools.color(5) + "%s=" + tools.nocolor() + "%s" sep = tools.color(5) + ", " + tools.nocolor() row = "" for mc in self.columns: values = mc.func(state) if type(values) != tuple: values = (values, ) for n, col in enumerate(mc.columns): if not first: row += sep else: first = False row += fmt % (col.id, col.fmt % values[n]) return row
def generateRow(self, state): first = True fmt = tools.color(5) + "%s=" + tools.nocolor() + "%s" sep = tools.color(5) + ", " + tools.nocolor() row = "" for mc in self.columns: values = mc.func(state) if type(values) != tuple: values = (values,) for n, col in enumerate(mc.columns): if not first: row += sep else: first = False row += fmt % (col.id, col.fmt % values[n]) return row
def format(self, record): msg_str = logging.Formatter.format(self, record) time_str = logging.Formatter.formatTime(self, record, self.date_fmt) col = self.color_map.get(record.levelno, 6) return "".join([tools.color(col), time_str, " - ", msg_str, tools.nocolor()])
def format(self, record): return tools.color(_color_map[record.levelno]) + logging.Formatter.format(self, record) + tools.nocolor()