Exemplo n.º 1
0
    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)
Exemplo n.º 2
0
    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)
Exemplo n.º 3
0
    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()])
Exemplo n.º 4
0
    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
Exemplo n.º 5
0
    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
Exemplo n.º 6
0
    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()])
Exemplo n.º 7
0
 def format(self, record):
     return tools.color(_color_map[record.levelno]) + logging.Formatter.format(self, record) + tools.nocolor()