Another (less efficient) way to do this is to keep the URLs of pages visited and the time they were visited as a key/value pair in a user's session. Then when the session ends (in the onDelete method of the session data manager), postprocess the log data and write it to a database or a file. For more info, see http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/Sessions .stx . ----- Original Message ----- From: "Dennis Allison" <allison@sumeru.stanford.EDU> To: <allison@sumeru.stanford.EDU>; <chrism@zope.com>; <evan@4-am.com>; <zope@zope.org> Sent: Thursday, September 19, 2002 3:17 PM Subject: Re: [Zope] Re: Access Rules
"Chris McDonough" <chrism@zope.com> replied:
The first problem you have is that you're trying to compute the
time
differences between page switches in realtime. Don't do that. Log the simple stuff first and postprocess it to get the more complicated stuff.
Furthermore, I think the second problem you have is one of filtering. There are some URL accesses that you don't care about (like accesses to the "chrome" and images that make up the UI) and that's OK. Just give the objects that you *do* care about a "file extension" something like "_html". So each thing you want to render in ZZZZ, call it "page1_html", "page2_html", etc. Log every page access using a URL. Then filter the log based on your file extension before postprocessing.
Yes, I'd thought about using the Z2.log file, but decided it would be easier to do it in the guts of Zope becasue I could programatically resolve ambiguities when they arise. Looks like I may need to back off from that position.
It is true that the Z2.log is adequate most of the time although there are instances where I cannot detemine whether a logged GET is a page closing event or not. Processing the Z2.log file would have to be done in pseudo real-time since the usage report is supposed to be available as a snapshot on demand.
The naming conventions pretty much match the ones you suggest.
Thanks. I give the Z2.log a go.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )