mirror of
https://github.com/k4yt3x/video2x.git
synced 2024-12-29 16:09:10 +00:00
bumped last edited date and added comments
This commit is contained in:
parent
708c983c1e
commit
d688ca490e
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user