So, when I copy paste the following x times to the python prompt, it add the log x times to the end of the designated file.
How can I change the code so that each ti
Your log messages are being duplicated because you call addHandler
more than once. Each call to addHandler
adds an additional log handler.
If you want to make sure the file is created from scratch, add an extra line of code to remove it:
os.remove(os.path.join(paths["work"], "oneDayFileLoader.log"))