mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-12 04:49:00 +00:00
emph gets logged to stdout for #331
This commit is contained in:
@@ -44,11 +44,15 @@ class Logger:
|
|||||||
cend = self._color(self.RESET)
|
cend = self._color(self.RESET)
|
||||||
sys.stdout.write('\t{}->{} {}{}'.format(cstart, cend, string, end))
|
sys.stdout.write('\t{}->{} {}{}'.format(cstart, cend, string, end))
|
||||||
|
|
||||||
def emph(self, string):
|
def emph(self, string, stdout=True):
|
||||||
"""emphasis log"""
|
"""emphasis log"""
|
||||||
cstart = self._color(self.EMPH)
|
cstart = self._color(self.EMPH)
|
||||||
cend = self._color(self.RESET)
|
cend = self._color(self.RESET)
|
||||||
sys.stderr.write('{}{}{}'.format(cstart, string, cend))
|
content = '{}{}{}'.format(cstart, string, cend)
|
||||||
|
if not stdout:
|
||||||
|
sys.stderr.write(content)
|
||||||
|
else:
|
||||||
|
sys.stdout.write(content)
|
||||||
|
|
||||||
def err(self, string, end='\n'):
|
def err(self, string, end='\n'):
|
||||||
"""error log"""
|
"""error log"""
|
||||||
|
|||||||
Reference in New Issue
Block a user