This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Marc.Abramowitz
Recipients Marc.Abramowitz, christian.heimes, gvanrossum, sebastian, vinay.sajip
Date 2012-05-18.16:57:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1337360233.9.0.0823462846911.issue1436@psf.upfronthosting.co.za>
In-reply-to
Content
I just ran into this issue with Python 2.5 (doesn't seem to be an issue in >= 2.6?) and for the benefit of anyone else, I'm copying the answer from `Vinay's Google Group post <http://groups.google.com/group/comp.lang.python/browse_thread/thread/21be57fae7e9381a>` into this bug, in case the Google group goes away or the URL changes.

    The values in the config file are interpreted in the context of the
    logging module's namespace. Hence, one way of achieving what you 
    want is putting any custom handlers in a module of your own, and
    providing a binding in the logging module's namespace. For example: 
    assuming your DBHandler is defined in a module customhandlers, you 
    could do this somewhere in your code, before loading the 
    configuration:

        import logging
        import customhandlers # Use your own module name here

        logging.custhandlers = customhandlers # Bind your module to "custhandlers" in logging

    and then your logging configuration can refer to 
    "custhandlers.DBHandler". Of course I merely used "custhandlers" and 
    "customhandlers" to show how you can bind to an arbitrary name.
History
Date User Action Args
2012-05-18 16:57:14Marc.Abramowitzsetrecipients: + Marc.Abramowitz, gvanrossum, vinay.sajip, christian.heimes, sebastian
2012-05-18 16:57:13Marc.Abramowitzsetmessageid: <1337360233.9.0.0823462846911.issue1436@psf.upfronthosting.co.za>
2012-05-18 16:57:13Marc.Abramowitzlinkissue1436 messages
2012-05-18 16:57:12Marc.Abramowitzcreate