Skip to content

Commit 832d99b

Browse files
committed
Issue #17376: Clarified documentation for TimedRotatingFileHandler weekday rotation.
1 parent f81de8d commit 832d99b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Doc/library/logging.handlers.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,15 @@ timed intervals.
236236
+----------------+-----------------------+
237237
| ``'D'`` | Days |
238238
+----------------+-----------------------+
239-
| ``'W'`` | Week day (0=Monday) |
239+
| ``'W0'-'W6'`` | Weekday (0=Monday) |
240240
+----------------+-----------------------+
241241
| ``'midnight'`` | Roll over at midnight |
242242
+----------------+-----------------------+
243243

244+
When using weekday-based rotation, specify 'W0' for Monday, 'W1' for
245+
Tuesday, and so on up to 'W6' for Sunday. In this case, the value passed for
246+
*interval* isn't used.
247+
244248
The system will save old log files by appending extensions to the filename.
245249
The extensions are date-and-time based, using the strftime format
246250
``%Y-%m-%d_%H-%M-%S`` or a leading portion thereof, depending on the

0 commit comments

Comments
 (0)