Issue Details (XML | Word | Printable)

Key: MODPYTHON-196
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Graham Dumpleton
Reporter: Graham Dumpleton
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
mod_python

Add req.server.log_error() and req.connection.log_error().

Created: 23/Oct/06 11:21 PM   Updated: 01/May/07 10:52 AM
Return to search
Component/s: core
Affects Version/s: None
Fix Version/s: 3.3.1

Time Tracking:
Not Specified

Resolution Date: 24/Oct/06 05:42 AM


 Description  « Hide
In mod_python you can currently log to the Apache error log file using:

apache.log_error() - This is a wrapper around ap_log_error(). By default it logs against the main Apache server. You can supply an alternate server object against which to log. Which server object is used is important where you have different logs files for different virtual servers.

req.log_error() - This is a wrapper around ap_log_rerror(). This logs against the virtual server the request is being handled within. The output also includes details about the client from which the request originated.

For completeness, should add:

req.server.log_error() - Also a wrapper around ap_log_error(). Would always log to the server which the method is called against.

req.connection.log_error() - This would be a wrapper around ap_log_cerror(). Would log against the virtual server the request is being handled within. Because it is associated with a particular client, the details of the client can again be recorded in the logged message.

Note that ap_log_cerror() was only introduced during Apache 2.0.55. As a result, if an older version of Apache is used than that, instead of using ap_log_cerror(), it would use ap_log_error() and use req.connection.base_server as the server to log against. In doing this, the client information wouldn't be displayed though.


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Graham Dumpleton made changes - 23/Oct/06 11:22 PM
Field Original Value New Value
Status Open [ 1 ] In Progress [ 3 ]
Graham Dumpleton made changes - 24/Oct/06 05:42 AM
Status In Progress [ 3 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Graham Dumpleton made changes - 01/May/07 10:52 AM
Status Resolved [ 5 ] Closed [ 6 ]