A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-October/029260.html below:

[Python-Dev] PEP 282 Implementation

[Python-Dev] PEP 282 ImplementationVinay Sajip vinay_sajip@red-dove.com
Mon, 7 Oct 2002 09:16:29 +0100
Guido van Rossum wrote:
>> Chris McDonough wrote:
>>> It would be helpful for the FileHandler class to define a method
>>> which just closes and reopens the current logfile (instead of
>>> actually rotating a set like-named logfiles).  This would allow
>>> logfile rotation to be performed by a separate process (e.g.
>>> RedHat's logrotate).  Sometimes it's better (and even necessary) to
>>> be able to use system-provided log rotation facilities instead of
>>> relying on the native rotation facilities.
> Having looked at it again, I think that this is definitely better than
> doing log rotation in the FileHandler.  The rotation code in the log
> handler currently calls tell() after each record is emitted.  This is
> expensive, and not needed if you use an external process to watch over
> the log files and rotate them.

I think file rotation can definitely come out of the core, since there are
many ways to do it and no one "right" way. I'll move the rotation stuff into
a subclass of FileHandler called RotatingFileHandler (anyone think of a
better name?). The FileHandler will remain in the core module; the subclass
will be in the "logging.handlers" module.

Vinay




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