Merge lp:~stub/launchpad/trivial into lp:launchpad

Proposed by Stuart Bishop
Status: Merged
Merged at revision: not available
Proposed branch: lp:~stub/launchpad/trivial
Merge into: lp:launchpad
Diff against target: 31 lines (+10/-3)
1 file modified
lib/canonical/launchpad/webapp/publication.py (+10/-3)
To merge this branch: bzr merge lp:~stub/launchpad/trivial
Reviewer Review Type Date Requested Status
Guilherme Salgado (community) code Approve
Review via email: mp+18258@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Stuart Bishop (stub) wrote :

Log the full URL to the zserver tracelog. This allows us to generate much more useful reports from it.

Revision history for this message
Guilherme Salgado (salgado) wrote :

looks good

(although it'd look nicer if you used a new branch with one of those funny names you always come up with, instead of this 'trivial' one with tons of associated bugs/m-ps, which will end up polluting the revision email ;)

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/webapp/publication.py'
2--- lib/canonical/launchpad/webapp/publication.py 2010-01-19 04:22:17 +0000
3+++ lib/canonical/launchpad/webapp/publication.py 2010-01-29 12:05:29 +0000
4@@ -28,8 +28,8 @@
5 from storm.exceptions import DisconnectionError, IntegrityError
6 from storm.zope.interfaces import IZStorm
7
8+from zc.zservertracelog.interfaces import ITraceLog
9 import zope.app.publication.browser
10-
11 from zope.app import zapi # used to get at the adapters service
12 from zope.app.publication.interfaces import BeforeTraverseEvent
13 from zope.app.security.interfaces import IUnauthenticatedPrincipal
14@@ -459,8 +459,15 @@
15 notify(BeforeTraverseEvent(ob, request))
16
17 def afterTraversal(self, request, ob):
18- """ We don't want to call _maybePlacefullyAuthenticate as does
19- zopepublication."""
20+ """See zope.publisher.interfaces.IPublication.
21+
22+ This hook does not invoke our parent's afterTraversal hook
23+ in zopepublication.py because we don't want to call
24+ _maybePlacefullyAuthenticate.
25+ """
26+ # Log the URL including vhost information to the ZServer tracelog.
27+ ITraceLog(request).log(request.getURL())
28+
29 assert hasattr(request, '_traversalticks_start'), (
30 'request._traversalticks_start, which should have been set by '
31 'beforeTraversal(), was not found.')