[Twisted-web] web2 vs. access.log
James Y Knight
foom at fuhm.net
Fri Apr 15 07:51:16 MDT 2005
On Apr 15, 2005, at 4:51 AM, Tommi Virtanen wrote:
>> Also, how do you feel the date and time generation and parsing
>> in t.w.http should be done? I need to be able to generate
> This is still ugly. Currently, a log of the things have an
> explicit .close() you need to call, or they leave a timer
> running (also making trial complain).
> Current starting the timer (incrementing the reference count)
> is implicit in object creation; I'm currently thinking of making
> it be an explicit operation. That would make it an unnecessary
> detail for any code that runs while a NevowSite factory is running,
> only leaving the start/stop in things that use timestamp/log
> outside of a real webserver -- mostly unit tests, that is.
I'd note that there are a bunch of other places where twisted.web
use the current time, so, it's probably not particularly worth it to
put in a special hack to not call time.time in log, while doing nothing
about all the other uses of time.time. You could use the response Date
header as the log time, if you like.
More information about the Twisted-web