[Zope] Userid in Z2.log
Wed, 24 Oct 2001 16:10:29 +0200
Tim Cook wrote:
> I didn't find where this issue has appeared in the archives but I
> thought I woould see if anyone has seen/solved it.
> The userid is not logged in my Z2.log:
> Zope Version Zope 2.3.2 (binary release, python 1.5.2,
> Python Version 1.5.2 (#10, Dec 6 1999, 12:16:27) [GCC 126.96.36.199]
> Installed products are:
> BTreeFolder Product
> I know that it was occuring before I started using CookieCrumbler
> and spellchecker. One item in the archives indicated that it
> *may* be asociated with LocalFS.
> The symptom is that I get a dash ( - ) following the IP where the
> userid should be.
> Any ideas appreciated.
I don't remember either, where I found it. But I use it so I can give
you the patch from my modified site:
Go to the file *Zserver/medusa/http_server.py* and edit the method
*log*. It must read like this (don't forget the import of base64
# python modules
# async modules
def log (self, bytes):
if not user_agent: user_agent=''
if not referer: referer=''
if auth is not None:
if string.lower(auth[:5]) == 'basic':
[name,password] = string.split(
' - %s - [%s] "%s" %d %d "%s" "%s"\n' % (
That should do the job.