diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2013-04-12 16:04:23 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2013-04-12 16:04:23 (GMT) |
commit | a713079ed82b0bfd841562fd7ac043313feb8ef6 (patch) | |
tree | c7f74851f926b28cd435845184aa5628b3ad84d8 /Doc/library | |
parent | 8a9e38e71519066ec256ac685c7bcb33ab429800 (diff) | |
download | cpython-a713079ed82b0bfd841562fd7ac043313feb8ef6.zip cpython-a713079ed82b0bfd841562fd7ac043313feb8ef6.tar.gz cpython-a713079ed82b0bfd841562fd7ac043313feb8ef6.tar.bz2 |
Closed #9556: Allowed specifying a time-of-day for a TimedRotatingFileHandler to rotate.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/logging.handlers.rst | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Doc/library/logging.handlers.rst b/Doc/library/logging.handlers.rst index 30f9e03..909a678 100644 --- a/Doc/library/logging.handlers.rst +++ b/Doc/library/logging.handlers.rst @@ -296,7 +296,7 @@ The :class:`TimedRotatingFileHandler` class, located in the timed intervals. -.. class:: TimedRotatingFileHandler(filename, when='h', interval=1, backupCount=0, encoding=None, delay=False, utc=False) +.. class:: TimedRotatingFileHandler(filename, when='h', interval=1, backupCount=0, encoding=None, delay=False, utc=False, atTime=None) Returns a new instance of the :class:`TimedRotatingFileHandler` class. The specified file is opened and used as the stream for logging. On rotating it also @@ -346,6 +346,12 @@ timed intervals. If *delay* is true, then file opening is deferred until the first call to :meth:`emit`. + If *atTime* is not ``None``, it must be a ``datetime.time`` instance which + specifies the time of day when rollover occurs, for the cases where rollover + is set to happen "at midnight" or "on a particular weekday". + + .. versionchanged:: 3.4 + *atTime* parameter was added. .. method:: doRollover() |