Sujet : Re: FileNotFoundError thrown due to file name in file, rather than file itself
De : torriem (at) *nospam* gmail.com (Michael Torrie)
Groupes : comp.lang.pythonDate : 14. Nov 2024, 05:07:56
Autres entêtes
Message-ID : <mailman.107.1731557282.4695.python-list@python.org>
References : 1 2 3 4 5 6
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1
On 11/12/24 12:10 PM, Left Right via Python-list wrote:
But, it's
impossible to reliably rotate a log file. There's always a chance
that during the rotation some log entries will be written to the file
past the point of rotation, but prior to the point where the next logs
volume starts.
On any Unix system this is untrue. Rotating a log file is quite simple:
simply rename the log file, then send a signal to the process to close
the log file handle and open a new one. After that perhaps compress the
rotated log file. Nothing is lost. This is standard practice in Unix.
It is reliable.
Perhaps the scenario you posit would happen on Windows.
Date | Sujet | # | | Auteur |
11 Nov 24 | FileNotFoundError thrown due to file name in file, rather than file itself | 25 | | Loris Bennett |
11 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 17 | | Left Right |
12 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 16 | | Loris Bennett |
12 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 3 | | Left Right |
13 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 2 | | Greg Ewing |
13 Nov 24 | Re: FileNotFoundError thrown due to (Posting On Python-List Prohibited) | 1 | | Lawrence D'Oliveiro |
12 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 1 | | Mats Wichmann |
12 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 1 | | Chris Angelico |
13 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 2 | | Loris Bennett |
14 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 1 | | Barry |
13 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 1 | | Roel Schroeven |
14 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 1 | | Michael Torrie |
14 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 1 | | Left Right |
14 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 1 | | Chris Angelico |
13 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 1 | | D'Arcy Cain |
14 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 1 | | Ethan Furman |
14 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 2 | | Michael Torrie |
14 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 1 | | Jon Ribbens |
11 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 1 | | dieter.maurer |
11 Nov 24 | Re: FileNotFoundError thrown due to (Posting On Python-List Prohibited) | 1 | | Lawrence D'Oliveiro |
12 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 5 | | Chris Angelico |
12 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 3 | | Loris Bennett |
13 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 1 | | dieter.maurer |
14 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 1 | | Kushal Kumaran |
12 Nov 24 | Re: FileNotFoundError thrown due to file name in file, rather than file itself | 1 | | Loris Bennett |