Vinay Sajip <vinay_sa...@yahoo.co.uk> added the comment: Re point a) and opening files - why not use the "delay" parameter on FileHandlers, which delays opening until a message is actually logged? I can understand why one wouldn't want empty log files cluttering up the place, but the same argument doesn't apply to sockets. If you don't want an always-open connection, you could also use UDP. While the delay parameter takes care of files, why does it matter so much about sockets? Is it actually causing a practical problem, or does it just offend your aesthetic sensibilities?
If you submit a patch for fileConfig that only created handlers that were used by at least one logger, I would certainly look at it - I have both accepted and rejected numerous patches over the years. Would your patch also consider unused formatters? As the new behaviour could conceivably create a backward-compatibility problem (some users may be relying on the current behaviour, no matter how broken it seems to you), the new behaviour should be accessible through another config setting (e.g. ignore_unused) which defaults to False (the existing behaviour) if not specified in the config file. Re point b), it only really covers the case where you have single-level loggers (qualname = word), and not actually a multi-level hierarchy (qualname = words-separated-by-dots). So I don't feel it's worth doing this, especially as there seems to be no widespread demand for this functionality. I'll mark the issue as pending for now. ---------- status: open -> pending _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6136> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com