mirror of
https://github.com/python/cpython.git
synced 2025-08-16 23:01:34 +00:00
Issue #9512: Made comment more informative.
This commit is contained in:
parent
e5632642fc
commit
e8b1eafd88
1 changed files with 6 additions and 1 deletions
|
@ -108,8 +108,13 @@ class RotatingFileHandler(BaseRotatingHandler):
|
||||||
|
|
||||||
If maxBytes is zero, rollover never occurs.
|
If maxBytes is zero, rollover never occurs.
|
||||||
"""
|
"""
|
||||||
|
# If rotation/rollover is wanted, it doesn't make sense to use another
|
||||||
|
# mode. If for example 'w' were specified, then if there were multiple
|
||||||
|
# runs of the calling application, the logs from previous runs would be
|
||||||
|
# lost if the 'w' is respected, because the log file would be truncated
|
||||||
|
# on each run.
|
||||||
if maxBytes > 0:
|
if maxBytes > 0:
|
||||||
mode = 'a' # doesn't make sense otherwise!
|
mode = 'a'
|
||||||
BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
|
BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
|
||||||
self.maxBytes = maxBytes
|
self.maxBytes = maxBytes
|
||||||
self.backupCount = backupCount
|
self.backupCount = backupCount
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue