Skip to content

Commit

Permalink
Update logger.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nimaid committed Dec 1, 2019
1 parent 6aac9ee commit c468028
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def __init__(self, file_in):
def __del__(self):
sys.stdout = self.stdout
def write(self, data):
self.stdout.write(data)
self.file.write(data)
self.file.flush()
self.stdout.write(data)
def flush(self):
self.file.flush()
class _LoggerStderr:
Expand All @@ -43,9 +43,9 @@ def __init__(self, file_in):
def __del__(self):
sys.stderr = self.stderr
def write(self, data):
self.stderr.write(data)
self.file.write(data)
self.file.flush()
self.stderr.write(data)
def flush(self):
self.file.flush()

Expand Down

0 comments on commit c468028

Please sign in to comment.