diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2016-08-31 07:22:29 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2016-08-31 07:22:29 (GMT) |
commit | dd917f84e3775596049e09746f32053c50b3d422 (patch) | |
tree | 5b59a563c228493069bcf00e166fba7cea8ebfef /Doc/library/contextlib.rst | |
parent | ee47e5cf8ad0e52e2c5291662b9b15c2ba8848ea (diff) | |
download | cpython-dd917f84e3775596049e09746f32053c50b3d422.zip cpython-dd917f84e3775596049e09746f32053c50b3d422.tar.gz cpython-dd917f84e3775596049e09746f32053c50b3d422.tar.bz2 |
Closes #27904: Improved logging statements to defer formatting until needed.
Diffstat (limited to 'Doc/library/contextlib.rst')
-rw-r--r-- | Doc/library/contextlib.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst index 810cea8..dd34c96 100644 --- a/Doc/library/contextlib.rst +++ b/Doc/library/contextlib.rst @@ -590,10 +590,10 @@ single definition:: self.name = name def __enter__(self): - logging.info('Entering: {}'.format(self.name)) + logging.info('Entering: %s', self.name) def __exit__(self, exc_type, exc, exc_tb): - logging.info('Exiting: {}'.format(self.name)) + logging.info('Exiting: %s', self.name) Instances of this class can be used as both a context manager:: |