summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_logging.py
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2012-03-05 09:43:47 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2012-03-05 09:43:47 (GMT)
commitb6f6670d87f922564d535062dda42eb6d54d36af (patch)
treeb46c4c6294fc57171433dc61ea51618647ba6995 /Lib/test/test_logging.py
parent4e99a315b7d10049a16fb1529d2976f13dae5b71 (diff)
downloadcpython-b6f6670d87f922564d535062dda42eb6d54d36af.zip
cpython-b6f6670d87f922564d535062dda42eb6d54d36af.tar.gz
cpython-b6f6670d87f922564d535062dda42eb6d54d36af.tar.bz2
Added more diagnostics for diagnosing #12151.
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r--Lib/test/test_logging.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 92e6994..b490b6e 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -3651,6 +3651,8 @@ class TimedRotatingFileHandlerTest(BaseFileTest):
def test_rollover(self):
fh = logging.handlers.TimedRotatingFileHandler(self.fn, 'S',
backupCount=1)
+ fmt = logging.Formatter('%(asctime)s %(message)s')
+ fh.setFormatter(fmt)
r = logging.makeLogRecord({'msg': 'testing'})
fh.emit(r)
self.assertLogFile(self.fn)