Message121955
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' |
|
Date |
User |
Action |
Args |
2010-11-21 18:23:28 | maurobaraldi | set | recipients:
+ maurobaraldi, terry.reedy, vinay.sajip, techtonik, eric.araujo, docs@python, Henri.Salo |
2010-11-21 18:23:27 | maurobaraldi | set | messageid: <1290363807.98.0.783240095493.issue8890@psf.upfronthosting.co.za> |
2010-11-21 18:23:26 | maurobaraldi | link | issue8890 messages |
2010-11-21 18:23:26 | maurobaraldi | create | |
|