1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 17:24:46 +00:00

logging improvements

This commit is contained in:
deadc0de6
2017-03-26 14:22:48 +02:00
parent 6b59e22d49
commit f4643f2514

View File

@@ -38,17 +38,17 @@ class Logger:
def err(self, string, end='\n'):
cs = self._color(self.RED)
ce = self._color(self.RESET)
sys.stderr.write('%s[ERR]%s %s%s' % (cs, string, end, ce))
sys.stderr.write('%s[ERR] %s %s%s' % (cs, string, end, ce))
def warn(self, string, end='\n'):
cs = self._color(self.YELLOW)
ce = self._color(self.RESET)
sys.stderr.write('%s[WARN]%s %s%s' % (cs, string, end, ce))
sys.stderr.write('%s[WARN] %s %s%s' % (cs, string, end, ce))
def dry(self, string, end='\n'):
cs = self._color(self.GREEN)
ce = self._color(self.RESET)
sys.stdout.write('%s[DRY]%s %s%s' % (cs, string, end, ce))
sys.stdout.write('%s[DRY] %s %s%s' % (cs, string, end, ce))
def raw(self, string, end='\n'):
sys.stdout.write('%s%s' % (string, end))