Repeated output when logging exceptions

Vinay Sajip vinay_sajip at
Tue Sep 29 08:53:35 CEST 2009

On Sep 28, 9:38 pm, John Gordon <gor... at> wrote:
> If I didn't do all that in a class, where would I do it?

You could, for example, use the basicConfig() function to do it all
for you.

import logging

logging.debug('This message should go to the log file')

Here's the documentation link for simple examples:

Here's the link for basicConfig:


Vinay Sajip

More information about the Python-list mailing list