Thomas Guettler wrote: > A found this solution. > > # file logconfig.py > import logging > if not hasattr(logging, "set_up_done"): > logging.set_up_done=False > > def set_up(myhome): > if logging.set_up_done: > return > logging.set_up_done=True > Here's an alternative solution - it's based on the idea that the handlers are added to the logger only once. (getLogger returns the same logger instance each time).
import logging logger=logging.getLogger("dws") if not logger.handlers: ... logger.addHandler(....) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---