475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
|
self.method = name
return self.log_print
# Printer
def log_print(self, *args, **kwargs):
# debug level
method = self.method.upper()
if not method == "ERR":
if "debug" in conf and not conf.debug:
return
# color/prefix
method = r"[{}[{}][0m".format(self.colors.get(method, "47m"), method)
# output
print(method + " " + " ".join([str(a) for a in args]), file=sys.stderr)
|
|
|
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
|
self.method = name
return self.log_print
# Printer
def log_print(self, *args, **kwargs):
# debug level
method = self.method.upper()
if method != "ERR":
if "debug" in conf and not conf.debug:
return
# color/prefix
method = r"[{}[{}][0m".format(self.colors.get(method, "47m"), method)
# output
print(method + " " + " ".join([str(a) for a in args]), file=sys.stderr)
|