mirror of
https://github.com/k4yt3x/video2x.git
synced 2025-01-04 04:39: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):
|
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.terminal = terminal
|
||||||
self.log = logfile.open(mode='a+')
|
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.write(message)
|
||||||
self.terminal.flush()
|
self.terminal.flush()
|
||||||
self.log.write(message)
|
self.log.write(message)
|
||||||
self.log.flush()
|
self.log.flush()
|
||||||
|
|
||||||
def flush(self):
|
def flush(self):
|
||||||
|
""" flush logger (for compability only)
|
||||||
|
"""
|
||||||
pass
|
pass
|
||||||
|
@ -13,7 +13,7 @@ __ __ _ _ ___ __ __
|
|||||||
Name: Video2X Controller
|
Name: Video2X Controller
|
||||||
Creator: K4YT3X
|
Creator: K4YT3X
|
||||||
Date Created: Feb 24, 2018
|
Date Created: Feb 24, 2018
|
||||||
Last Modified: May 23, 2020
|
Last Modified: June 4, 2020
|
||||||
|
|
||||||
Editor: BrianPetkovsek
|
Editor: BrianPetkovsek
|
||||||
Last Modified: June 17, 2019
|
Last Modified: June 17, 2019
|
||||||
|
Loading…
Reference in New Issue
Block a user