bumped last edited date and added comments

This commit is contained in:
k4yt3x 2020-06-04 22:13:30 -04:00
parent 708c983c1e
commit d688ca490e
2 changed files with 15 additions and 2 deletions

View File

@ -20,14 +20,27 @@ class BiLogger(object):
"""
def __init__(self, terminal: _io.TextIOWrapper, logfile: pathlib.Path):
""" initialize BiLogger
Args:
terminal (_io.TextIOWrapper): original terminal IO wrapper
logfile (pathlib.Path): target log file path object
"""
self.terminal = terminal
self.log = logfile.open(mode='a+')
def write(self, message):
def write(self, message: str):
""" write message to original terminal output and log file
Args:
message (str): message to write
"""
self.terminal.write(message)
self.terminal.flush()
self.log.write(message)
self.log.flush()
def flush(self):
""" flush logger (for compability only)
"""
pass

View File

@ -13,7 +13,7 @@ __ __ _ _ ___ __ __
Name: Video2X Controller
Creator: K4YT3X
Date Created: Feb 24, 2018
Last Modified: May 23, 2020
Last Modified: June 4, 2020
Editor: BrianPetkovsek
Last Modified: June 17, 2019