Esempio n. 1
0
 def emit(self, record: logging.LogRecord):
     output = self.format(record)
     if record.levelno >= logging.ERROR:
         self.__shell.poutput(ansi.style_error(output))
     elif record.levelno >= logging.WARN:
         self.__shell.poutput(ansi.style_warning(output))
     else:
         self.__shell.pfeedback(ansi.style_success(output))
Esempio n. 2
0
 def emit(self, record: logging.LogRecord):
     output = self.format(record)
     if record.levelno >= logging.ERROR:
         print(ansi.style_error(output))
     elif record.levelno >= logging.WARN:
         print(ansi.style_warning(output))
     else:
         print(ansi.style_success(output))