I am having trouble with the logging facility.
My TG application imports several modules, each of which enables
logging.  Counting the main controllers.py there are six modules that
enable logging.  The problem is that after all of them are imported,
each log event is replicated 6 times in the log.  I would like each
event to appear only once, of course.

I do this in the controllers module and the other one I am working on:

import logging
log = logging.getLogger("mypackage.controllers")

In other modules, this is used:

import logging
logging.basicConfig(level=logging.info,
    format = %(asctime)s\t%(levelname)s\t%message)s',
    filename = "mylogfile.log",
    filemode ='w')

What am I doing wrong.  How do I get it to either output unique files
for each module or to output only one entry for each logging event?

Thanks,
Herb




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to