def log(self, e): if self.options.verbosity >= utils.log_tier(e.level): click.secho(e.msg, file=self.options.tfile, fg=dict(error="red", warn="yellow").get(e.level), dim=(e.level == "debug"), err=(e.level == "error"))
def add_log(self, e, level="info"): if level == "error": self.has_errored = True if self.options.verbosity >= utils.log_tier(level): click.secho(e, file=self.options.tfile, fg=dict(error="red", warn="yellow").get(level), dim=(level == "debug"), err=(level == "error"))
def add_log(self, e, level="info"): if level == "error": self.has_errored = True if self.options.verbosity >= utils.log_tier(level): click.secho(e, file=self.options.tfile, fg="red" if level == "error" else None, dim=(level == "debug"), err=(level == "error"))
def add_log(self, e, level="info"): if level == "error": self.has_errored = True if self.options.verbosity >= utils.log_tier(level): self.echo( e, fg="red" if level == "error" else None, dim=(level == "debug"), err=(level == "error") )
def add_log(self, e, level="info"): if level == "error": self.has_errored = True if self.options.verbosity >= utils.log_tier(level): click.secho( e, file=self.options.tfile, fg=dict(error="red", warn="yellow").get(level), dim=(level == "debug"), err=(level == "error"), )
def sig_add_log(self, sender, e, level): if self.options.verbosity < utils.log_tier(level): return if level in ("error", "warn"): signals.status_message.send( message="{}: {}".format(level.title(), e)) e = urwid.Text((level, str(e))) else: e = urwid.Text(str(e)) self.logbuffer.append(e) if len(self.logbuffer) > EVENTLOG_SIZE: self.logbuffer.pop(0) self.logbuffer.set_focus(len(self.logbuffer) - 1)
def sig_add_log(self, sender, e, level): if self.options.verbosity < utils.log_tier(level): return if level == "error": signals.status_message.send( message = "Error: %s" % str(e) ) e = urwid.Text(("error", str(e))) else: e = urwid.Text(str(e)) self.logbuffer.append(e) if len(self.logbuffer) > EVENTLOG_SIZE: self.logbuffer.pop(0) self.logbuffer.set_focus(len(self.logbuffer) - 1)
def sig_add_log(self, sender, e, level): if self.options.verbosity < utils.log_tier(level): return if level in ("error", "warn"): signals.status_message.send( message = "{}: {}".format(level.title(), e) ) e = urwid.Text((level, str(e))) else: e = urwid.Text(str(e)) self.logbuffer.append(e) if len(self.logbuffer) > EVENTLOG_SIZE: self.logbuffer.pop(0) self.logbuffer.set_focus(len(self.logbuffer) - 1)