I have the following lines of code that initialize logging. I comment one out and leave the other to be used. The problem that I\'m facing is that the one that is meant to log t
I got the same error, I fixed it by passing the following argument to the basic config.
logging.basicConfig(
level="WARNING",
format="%(asctime)s - %(name)s - [ %(message)s ]",
datefmt='%d-%b-%y %H:%M:%S',
force=True,
handlers=[
logging.FileHandler("debug.log"),
logging.StreamHandler()
])
Here as you can see passing force=True
overrides any other BasicConfigs