I\'m trying to find out a way in python to redirect the script execution log to a file as well as stdout
in a pythonic way. Is there any easy way of achieving t
I just want to build upon Serpens answer and add the line:
logger.setLevel('DEBUG')
This will allow you to chose what level of message gets logged.
For example in Serpens example,
logger.info('Info message')
Will not get recorded as it defaults to only recording Warnings and above.
More about levels used can be read about here