On Sep 28, 9:38 pm, John Gordon <gor...@panix.com> 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.basicConfig(filename='/path/to/my/log',level=logging.DEBUG)

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

Here's the documentation link for simple examples:

http://docs.python.org/library/logging.html#simple-examples

Here's the link for basicConfig:

http://docs.python.org/library/logging.html#logging.basicConfig

Regards,

Vinay Sajip
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to