Best way to do access logging?
I'm interested in doing some access logging for my Zope site -- a record that such and such an authenticated user accessed such and such a page. Anybody have an access log product already? Where is the best place to hook into the page serving process to grab the user name and URL when a page gets served? Any issues with storing the log in the ZODB? I can send it out to a SQL database if necessary, but would prefer to keep it within Zope (and more portable) unless there is a good reason not to. Thanks! Andrew
Andrew Wilcox wrote:
I'm interested in doing some access logging for my Zope site -- a record that such and such an authenticated user accessed such and such a page.
We're starting to work on just that next week, or at least logging changes done by authenticated users. We're going to use SQL - we want to add a workflow tab (together with a record of who did what when) to lots of ZClasses, and we don't want to have to subclass them from a Workflow class. So we'll use a workflow object that'll be a method of the ZClasses, storing data in an external SQL database, 'cause the properties of the method will be in the class, not the instances. And I'd rather not keep this kind of data in Zope anyway. -- Itamar - itamars@ibm.net ---------------------------o----------------------------------------------o Perl/Gimp Greeting Cards | Trust? Ha! The US dollar is backed by ICBMs! | http://www.sealingwax.com | --Anonymous Coward, Slashdot |
At 12:22 AM 11/12/99 +0200, Itamar Shtull-Trauring wrote:
Andrew Wilcox wrote:
I'm interested in doing some access logging for my Zope site -- a record that such and such an authenticated user accessed such and such a page.
We're starting to work on just that next week, or at least logging changes done by authenticated users.
We're going to use SQL - we want to add a workflow tab (together with a record of who did what when) to lots of ZClasses, and we don't want to have to subclass them from a Workflow class. So we'll use a workflow object that'll be a method of the ZClasses, storing data in an external SQL database, 'cause the properties of the method will be in the class, not the instances. And I'd rather not keep this kind of data in Zope anyway.
Sounds neat! Are you planning to release the code? What factors lead to your decision to store the records in SQL instead of in Zope? Andrew
On Thu, 11 Nov 1999, Andrew Wilcox wrote:
What factors lead to your decision to store the records in SQL instead of in Zope?
So that you can perform queries and get treads from the usage of your website. Also, if you have a server farm you can point them all to the same SQL server and run a python script to process them on another machine and use XML-rpc to send a summary back to the Zope server. Cheers, Anthony Pfrunder
Andrew Wilcox wrote:
I'm interested in doing some access logging for my Zope site -- a record that such and such an authenticated user accessed such and such a page.
Anybody have an access log product already?
Somebody wrote a <dtml-log> tag, check out the Products section. -Michel
Anybody have an access log product already?
Somebody wrote a <dtml-log> tag, check out the Products section.
Yes, I saw that, thanks, but I would want to store it as a structured record, not mix it up with other Zope server logging. Also I would prefer not to have to add a tag or method call to *every* page on the site. Maybe I could subclass a Folder? Wouldn't one of its methods get called during the URL walk, I would think, and that might be a good point to capture access information. Then I would have a "Access Logging Folder" that would record authenticated user and URL path info when child objects were accessed.
On Thu, Nov 11, 1999 at 07:13:11PM -0500, Andrew Wilcox wrote:
Anybody have an access log product already?
Somebody wrote a <dtml-log> tag, check out the Products section.
Yes, I saw that, thanks, but I would want to store it as a structured record, not mix it up with other Zope server logging. Also I would prefer not to have to add a tag or method call to *every* page on the site.
You could try the SiteAccess product, the Acces Rule is called for _every_ request under the folder where it resides. []s, |alo +---- -- I am Lalo of deB-org. You will be freed. Resistance is futile. http://www.webcom.com/lalo mailto:lalo@webcom.com pgp key in the web page Debian GNU/Linux --- http://www.debian.org Brazil of Darkness - http://www.webcom.com/lalo/BroDar
participants (5)
-
Andrew Wilcox -
Anthony Pfrunder -
Itamar Shtull-Trauring -
Lalo Martins -
Michel Pelletier