This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author maurobaraldi
Recipients Henri.Salo, docs@python, eric.araujo, maurobaraldi, techtonik, terry.reedy, vinay.sajip
Date 2010-11-21.18:23:26
SpamBayes Score 0.0003085604
Marked as misclassified No
Message-id <1290363807.98.0.783240095493.issue8890@psf.upfronthosting.co.za>
In-reply-to
Content
Reviewing this thread and talking with another friends, I thought that the pythonic way to solve it should be use the tempfile module.

And here is a suggestion using the logging module with tempfile.

> import logging
> import tempfile
> fp, LOG_FILENAME = tempfile.mkstemp(suffix=".log")
> logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG)
> logging.debug('This message should go to the log file')
> LOG_FILENAME
'/tmp/tmprBhZz1.log'
History
Date User Action Args
2010-11-21 18:23:28maurobaraldisetrecipients: + maurobaraldi, terry.reedy, vinay.sajip, techtonik, eric.araujo, docs@python, Henri.Salo
2010-11-21 18:23:27maurobaraldisetmessageid: <1290363807.98.0.783240095493.issue8890@psf.upfronthosting.co.za>
2010-11-21 18:23:26maurobaraldilinkissue8890 messages
2010-11-21 18:23:26maurobaraldicreate