[mod_python] I use a custom login form. Can I make the userid showup in the access log?

Graham Dumpleton grahamd at dscpl.com.au
Thu Sep 1 19:22:49 EDT 2005


Scott Chapman wrote ..
> I'm using the latest apache2 and mod_python.
> 
> I'd really like to be able to change the username for logging purposes
> in the 
> access file.  Can this be done?

In your handler, assign the user name to "req.user". Eg:

  req.user = "scott"

This is the second time this question has come up lately, so looks like
I better add a FAQ entry. :-)

Graham


More information about the Mod_python mailing list