I am trying to use python logging with a config file and an own handler. This works to some degree. What really puzzle me is __init__
being called twice and _
You are missing an if __name__ == "__main__":
guard around your logging configuration code. It is getting executed a second time when logging
imports your test1
module to find the class reference.
Alternatively, use the name __main__.Test1TimedRotatingFileHandler
in the config file, or else put the configuration code and the handler class in different files.