On Sun, Nov 25, 2012 at 9:02 AM, Oleg Broytman <phd at phdru.name> wrote: > On Sun, Nov 25, 2012 at 01:14:11PM +0100, Matthias Bernt <MatatTHC at gmx.de> wrote: >> I'm using the logging module and write my log messages via the FileHandler. >> I just realized that using an external log rotation mechanism does not >> work. That is, new messages are not added to the file after >> rotation. > > An external log rotation mechanism ought to send a signal to the > application and the application ought to close and reopen logs. That is, > this is an application-level problem, not logging module-level. I'm not so sure. Logging ought to "just work" without the application having to do much about it the details. Log rotation is definitely a useful feature; I've run into this very issue before and never found a satisfactory solution. Surely it should be possible for the file handler to occasionally stat() its output file by name and compare that to fstat() for the file descriptor and if they differ, reopen? -- --Guido van Rossum (python.org/~guido)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4