Python logging: Why is __init__ called twice?
问题 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 __del__ being called once. When I remove the whole config file stuff and create the handler directly within the code __init__ is called once and __del__ is never called. My questions: Why is __init__ called twice? Why is __del__ called less often than __init__ ? The code: #!/bin/env python import logging import logging.handlers import