#2044: 'turbogears.access' logger does not conform to common/combined log format
-------------------------+--------------------------------------------------
Reporter: Chris Arndt | Owner: Chris Arndt
Type: defect | Status: new
Priority: normal | Milestone: 1.1 beta 2
Component: TurboGears | Version: 1.0.7
Severity: normal | Keywords:
-------------------------+--------------------------------------------------
In `turbogears.controllers` the `RootController` base class for root
controllers sets up a logger named `turbogears.access` and defines a
`_cp_log_access` method as a hook for !CherryPy to log client requests.
It defines a log message format which is similar but not entirely
conforming to [http://httpd.apache.org/docs/2.2/logs.html#combined
combined log format]. There are two things wrong with it:
a. If the client host name is unknown, the IP address should be logged,
but it logs an empty string instead.
b. The date is missing.
The attached patch fixes these two problems, changes the names in the log
line template to be more explicit, and also uses the value of the `X
-Forwarded-For' header as the client host name, if it is set, to cater for
TG apps that run behind a reverse proxy.
--
Ticket URL: <http://trac.turbogears.org/ticket/2044>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---