[Web-SIG] serving (potentially large) files through wsgi?
graham.dumpleton at gmail.com
Wed Dec 26 11:34:15 CET 2007
On 24/12/2007, Manlio Perillo <manlio_perillo at libero.it> wrote:
> Graham Dumpleton ha scritto:
> > On 22/12/2007, Manlio Perillo <manlio_perillo at libero.it> wrote:
> >> Graham Dumpleton ha scritto:
> >>> [...]
> >>> The more and more that this discussion goes on, the conclusion I am
> >>> coming to is that WSGI applications should simply not be using the web
> >>> server log files for application logging at all.
> >> The problem with this is that log files cannot be easily rotated.
> > There are rotating log handlers in the Python logging package.
> The problem is that it is not interoperable with external tools like
Why does it need to be interoperable? If the logging module handler
does the rotation then you don't need logrotate to be doing it again.
The issue with things like logrotate is that either the application
doing the logging has to be able to accept a signal to tell it to
close and reopen the log file, or the application itself needs to
simply close and reopen the log file on a periodic basis.
As I said before, the other option it to use a log handler which uses
syslog/syslog-ng instead and have those packages handle rotation and
other stuff for you.
More information about the Web-SIG