Help with Borg design Pattern
Maric Michaud
maric at aristote.info
Mon Jun 30 05:42:43 EDT 2008
Le Monday 30 June 2008 10:52:24 Casey McGinty, vous avez écrit :
> I'm running into a slight problem however that my run-time defined logging
> level is not correctly set until after the module has initialized,
> preventing any log messages from showing up. Is there a pythonic way to get
> around this? I'm thinking of adding a module init routine, but I don't feel
> like this is clean solution.
If the logging machinery is effectively not ready (and couldn't be implemented
so) at the time "import logging" statment is done, then you'll need to have a
logging procedure which queue the message waitinig for system to be
operational and deliver them lazily. This is quite an easy thing to implement
(hint : use stdlib data structures that support multi threading from the
beginning).
--
_____________
Maric Michaud
More information about the Python-list
mailing list