Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-13 Thread Roel Schroeven via Python-list
Op 12/11/2024 om 20:10 schreef Left Right via Python-list: > I am not entirely convinced by NB2. I am, in fact, a sort of sysadmin > person and most of my programs write to a log file. The programs are > also moderately complex, so a single program might access a database, > query an LDAP serve

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-13 Thread Dieter Maurer via Python-list
Loris Bennett wrote at 2024-11-12 10:00 +0100: > ... >However, it strikes me as not immediately obvious that the logging file >must exist at this point. I can imagine a situation in which I want to >configure a default log file and create it if it missing. This is what happens usually: if you ope

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-13 Thread Kushal Kumaran via Python-list
On Wed, Nov 13 2024 at 07:36:04 PM, dieter.mau...@online.de wrote: > Loris Bennett wrote at 2024-11-12 10:00 +0100: >> ... >>However, it strikes me as not immediately obvious that the logging file >>must exist at this point. I can imagine a situation in which I want to >>configure a default log fi

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-13 Thread Michael Torrie via Python-list
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.

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-13 Thread Left Right via Python-list
> On any Unix system this is untrue. Rotating a log file is quite simple: I realized I posted this without cc'ing the list: http://jdebp.info/FGA/do-not-use-logrotate.html . The link above gives a more detailed description of why log rotation on the Unix system is not only not simple, but is, in