zaf schrieb:
> Ok actually I think I got it.
> Here's my log conf : http://paste.turbogears.org/paste/12906
> would there be a way to get the user's ip address with that ?

The 'turbogears.access' logger (which is defined here [1]) logs the
client IP as the first field (cherrypy.request.remote_host [2]).

Of course this will only work, if your application is not behind a
reverse proxy - in which case the remote IP will always be that of the
proxy (probably 127.0.0.1).

You can overwrite the _cp_log_access method in your root controller
class and change the log format. For example, you could use
cherrypy.request.headers['X-Forwarded-For'] for the client IP, if it is set.

[1]
http://trac.turbogears.org/browser/branches/1.1/turbogears/controllers.py#L478
[2] http://docs.turbogears.org/1.0/RequestResponse


Chris

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to