[Twisted-web] twisted log files

Manlio Perillo manlio_perillo at libero.it
Sun Dec 10 05:55:18 CST 2006

Noah Gift ha scritto:
> I am not sure if awstats directly parses twisted log files, 

I'm rather sure that it can not parse Twisted log file but there are two 

1) write a custom logger that produce log in a "well know" format
2) add support to Twisted log file in awstats.
    This should be only a matter to find the correct format string and
    check if the log contains all the informations that awstats needs.

> but I 
> recently wrote a chunk of python code to re-parse sections of the 
> awstats output and control when it was run etc.  It got me thinking that 
> it would be great to have a python version of awstats, perhaps 
> integrated into a web application framework.  

Not sure this is a good idea.
For every request you have to update the database.

It is better to have an external process that parse the log file.

By the way: why it is not possible to choose log file policy?
The log file created by twistd will rotate on its own and I do not want 
I think that twistd should have an option for controlling such behaviour.

> That is the problem with 
> using awstats with python as awstats is all perl and the config file is 
> just huge around 1500 lines I think.

Regards   Manlio Perillo

More information about the Twisted-web mailing list