Improper creating of logger instances or a Memory Leak?

Vinay Sajip vinay_sajip at yahoo.co.uk
Mon Jun 20 20:19:06 EDT 2011


On Jun 20, 3:50 pm, foobar <wjship... at gmail.com> wrote:

> Regarding adding a new logger for each thread - each thread represents
> a telephone call in a data collection system. I need to be able to
> cleanly provided call-loggingfor debugging to my programmers as well
> as dataloggingand verification; having a single log file is somewhat
> impractical.  To use theloggingfiltering then I would have to be
> dynamically adding to the filtering hierarchy continuously, no?
>

You could, for example, have a different *handler* for each thread.
There are a number of possibilities according to exactly what you want
to do, but there's certainly no need to create one *logger* per
thread.

Regards,

Vinay Sajip



More information about the Python-list mailing list