[issue40469] TimedRotatingFileHandler rotating on use not time

2022-03-31 Thread Steven D'Aprano
Steven D'Aprano added the comment: See this thread on Discuss: https://discuss.python.org/t/logging-timedrotatingfilehandler-never-rotates-in-certain-cases/14747/1 -- nosy: +steven.daprano ___ Python tracker

[issue40469] TimedRotatingFileHandler rotating on use not time

2021-08-13 Thread Vinay Sajip
Vinay Sajip added the comment: > You are far better and more experienced in maintaining widely used opensource > codebases so I wouldn't argue with you, but... :) Well, if a change introduces a problem, it will be my lookout, won't it? Just as the original patch for bpo-8117 is proving to

[issue40469] TimedRotatingFileHandler rotating on use not time

2021-08-13 Thread Ivan Marton
Ivan Marton added the comment: > Well, what's the need to rotate based on time when you just run scripts > sporadically or they're very short-lived? Not trying to argue, just trying to > understand. > Yes, but generally daemons are long-lived relative to the rotation interval, > aren't

[issue40469] TimedRotatingFileHandler rotating on use not time

2021-08-13 Thread Vinay Sajip
Vinay Sajip added the comment: I just checked - the relevant code (using MTIME) was added in 2010, as a fix for bpo-8117 - around the time that Python 2.6 was released. -- ___ Python tracker

[issue40469] TimedRotatingFileHandler rotating on use not time

2021-08-13 Thread Vinay Sajip
Vinay Sajip added the comment: > Well, there is nothing in the documentation that would say the logrotation > can be only performed by continously running scripts, thats why. :) Well, what's the need to rotate based on time when you just run scripts sporadically or they're very short-lived?

[issue40469] TimedRotatingFileHandler rotating on use not time

2021-08-13 Thread Ivan Marton
Ivan Marton added the comment: Well, there is nothing in the documentation that would say the logrotation can be only performed by continously running scripts, thats why. :) There are scripts or even daemons written in Python that need to be restarted from time to time. If the logrotate

[issue40469] TimedRotatingFileHandler rotating on use not time

2021-08-12 Thread Vinay Sajip
Vinay Sajip added the comment: > The assumed behaviour of TimedRotatingFileHandler is to rotate log files > older than configured. Even when the script is executed multiple times. Ah, but is it? The purpose of TimedRotatingFileHandler is to rotate files based on time intervals, and is

[issue40469] TimedRotatingFileHandler rotating on use not time

2021-08-10 Thread Ivan Marton
Change by Ivan Marton : Added file: https://bugs.python.org/file50209/log_40469_single.py ___ Python tracker ___ ___ Python-bugs-list

[issue40469] TimedRotatingFileHandler rotating on use not time

2021-08-10 Thread Ivan Marton
Ivan Marton added the comment: The assumed behaviour of TimedRotatingFileHandler is to rotate log files older than configured. Even when the script is executed multiple times. self.rolloverAt (the variable that defines when the rollover should be performed) is set after each rollover and

[issue40469] TimedRotatingFileHandler rotating on use not time

2021-08-01 Thread Vinay Sajip
Vinay Sajip added the comment: With this slightly modified test script and the JSON configuration based on the YAML, I got the following results after running for a while: $ more info.log* :: info.log :: 2021-08-01 07:13:45 INFO Message no. 9 2021-08-01 07:14:15 INFO

[issue40469] TimedRotatingFileHandler rotating on use not time

2021-08-01 Thread Vinay Sajip
Change by Vinay Sajip : Added file: https://bugs.python.org/file50196/config.json ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40469] TimedRotatingFileHandler rotating on use not time

2021-02-28 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40469] TimedRotatingFileHandler rotating on use not time

2021-02-26 Thread Ivan Marton
Change by Ivan Marton : -- keywords: +patch nosy: +martonivan nosy_count: 1.0 -> 2.0 pull_requests: +23445 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24660 ___ Python tracker

[issue40469] TimedRotatingFileHandler rotating on use not time

2020-05-02 Thread Mark Hallett
Mark Hallett added the comment: Eg code to run is now attached -- Added file: https://bugs.python.org/file49112/app.py ___ Python tracker ___

[issue40469] TimedRotatingFileHandler rotating on use not time

2020-05-01 Thread Mark Hallett
New submission from Mark Hallett : Using the attached confing ymal file, the log file only rolls if the log file is not written to for over a minute, logging regulary (eg every 30s) prevents the correct rolling of the log. -- files: logging_config.ymal messages: 367849 nosy: