[Zope] Zope User in Apache Logs

2006-05-02 Thread Andreas Pauley

Hi all,

I've been going through the list archives looking for tips on logging 
(getting sensible statistics from my log files).
At the moment I have the setup recommended by most posts, namely 
multiple Apache virtual hosts that proxies requests to a single Zope 
instance.


I would like to know how I can get Apache to log the current Zope user.
Here's an example from my Apache access_log:
10.0.0.100 - - [02/May/2006:15:32:18 +0200] GET / HTTP/1.1 200 35721

Which results in this entry from my Z2.log:
127.0.0.1 - adp [02/May/2006:15:32:21 +0200] GET 
/VirtualHostBase/http/mysite.com:80/vhosts/mysite.com/VirtualHostRoot/ 
HTTP/1.1 200 36054  Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; 
rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2


The current user is logged by Zope, but not by Apache.
Is there a way to make Apache aware of who is logged in through Zope?

Regards,
Andreas

Jens Vagelpohl wrote:



On May 9, 2005, at 20:17, Luiz Fernando B. Ribeiro wrote:


Hi all,

I am hosting several virtual hosts and I need to provide access log  
reports (like awstats) for my clients. I would like to know if any  
of the following alternatives is possible:


1. Is it possible to have diferent access log files for each  virtual 
host?


2. Is it possible to include the %v (virtualhost) field in the  
current access log?




No on both counts. I suggest you use something in front of Zope, like  
Apache, and analyze its logs instead.


jens




_
This e-mail contains official information from Quality Business Consultants 
(Pty) Ltd and is intended for use by the addressee only.
Important notice: Important restrictions, qualifications and disclaimers (the 
Disclaimer) apply to this email.
To read this click on the following address: http://www.qbcon.com/disclaimer
The Disclaimer forms part of the content of this email in terms of section 11 
of the Electronic Communications and Transactions Act, 25 of 2002. If you are 
unable to access the Disclaimer, send a blank e-mail to [EMAIL PROTECTED] and 
we will send you a copy of the Disclaimer.

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope User in Apache Logs

2006-05-02 Thread Andreas Pauley

Andreas Pauley wrote:


I would like to know how I can get Apache to log the current Zope user.
Here's an example from my Apache access_log:
10.0.0.100 - - [02/May/2006:15:32:18 +0200] GET / HTTP/1.1 200 35721

Which results in this entry from my Z2.log:
127.0.0.1 - adp [02/May/2006:15:32:21 +0200] GET 
/VirtualHostBase/http/mysite.com:80/vhosts/mysite.com/VirtualHostRoot/ 
HTTP/1.1 200 36054  Mozilla/5.0 (Windows; U; Windows NT 5.0; 
en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2


O, I forgot to mention that the sites run Plone, which I assume uses 
cookies instead of HTTP headers for authentication.


_
This e-mail contains official information from Quality Business Consultants 
(Pty) Ltd and is intended for use by the addressee only.
Important notice: Important restrictions, qualifications and disclaimers (the 
Disclaimer) apply to this email.
To read this click on the following address: http://www.qbcon.com/disclaimer
The Disclaimer forms part of the content of this email in terms of section 11 
of the Electronic Communications and Transactions Act, 25 of 2002. If you are 
unable to access the Disclaimer, send a blank e-mail to [EMAIL PROTECTED] and 
we will send you a copy of the Disclaimer.

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Passing parameters to external methods

2000-09-13 Thread Andreas Pauley

Hi,
I need to pass some parameters to my external methods.

I have an external method that looks (somewhat) like this:

def extAccess(self, accttype_cde):
return accttype_cde

In the following dtml code, the following statement (with the SQL
method) works fine:

dtml-if "sqlAccess(accttype_cde='COM')"
 bsqlAccess returned something/b
/dtml-if

This statement, referencing my external method but using the same syntax
as with the sql method, gives lots of headaches:

dtml-if "extAccess(accttype_cde='COM')"
  bThe external method returned true/b
/dtml-if


I get the following error for the above statement:
Error Type: TypeError
Error Value: not enough arguments; expected 2, got 0


Anybody any ideas?

Thanks,
Andreas.

-- 
In a world without fences, who needs gates?


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Form Validation

2000-09-06 Thread Andreas Pauley

Hi,
I see you can let Zope do basic form validation for you by appending
":string" or ":int" to your form name.
The error messages that are displayed are not that clear, however.

How can I get more control over what happens when an error occurs?
(e.g. I'd like to be able to get back a list/ditionary of errors instead
of handling them one by one)

Where can I get documentation on all the built-in form validation
options at my disposal?
(e.g. a field may not be required, but if it is filled in it has to be
an integer)
Is Zope's built-in form validation sufficient for a complex system?
Are there better ways to do form validation?

I saw a php program on freshmeat.net the other day that supposedly
generates forms complete with client and server-side validation.
Do we have a similar product in Zope?

Thanks,
Andreas.
-- 
In a world without fences, who needs gates?


___
Zope maillist  -  [EMAIL PROTECTED]
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 )