pythonHelper.py:
import logging
log = logging.getLogger(__name__)
class PythonHelper():
def __init__(self):
log.info("message1")
pass
def func(self):
log.info("message2")
pass
def main(self):
self.func()
runner.py:
from pythonHelper import PythonHelper
class Runner(PythonHelper):
pass
if __name__ == "__main__":
a = Runner()
a.main()
# do something on a:
# which would print "message1" and "message2"
# to console screen and store them into files.
I cannot do any change in pythonHelper.py file. But I would like to suppress printing logs on console screen because printing is slow... How could I implement it? I only have a silly method using "command > output.txt" but I expect a method that change or add something in my runner code.