#11905 closed defect (fixed)
DeveloperLogModule doesn't work in Trac 1.1.2
Reported by: | Ryan J Ollos | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Component: | TracDeveloperPlugin |
Severity: | normal | Keywords: | |
Cc: | Jun Omae, lkraav | Trac Release: | 1.2 |
Description
In Trac 1.1.2 the classes implementing IRequestHandler
are cached in a dictionary, so DeveloperLogModule
is not longer able to insert itself to the front of the handlers
list in order to force itself to be processed first: tracdeveloperplugin/trunk/tracdeveloper/log.py@7968:32-33#L24. See trac:#11597 and [trac 12922#file7].
Attachments (4)
Change History (12)
comment:1 Changed 10 years ago by
Cc: | Jun Omae lkraav added; anonymous removed |
---|---|
Status: | new → assigned |
Changed 10 years ago by
Attachment: | t11905.patch added |
---|
Changed 10 years ago by
Attachment: | 1.1.2dev.png added |
---|
Changed 10 years ago by
Attachment: | 1.0.2dev.png added |
---|
comment:2 Changed 10 years ago by
Changed 10 years ago by
Attachment: | t11905.2.patch added |
---|
comment:4 Changed 10 years ago by
Thanks for submitting the patch . I'll take a look into this in the next few days
comment:5 follow-up: 6 Changed 10 years ago by
t11905.2.patch looks good to me. However, I think we should show log view except in the case of the following.
/chrome
request (before the patch, the plugin doesn't show log view for the request)- Ajax request (I don't think log view is needed in the case)
- No
TRAC_DEVELOP
permission (I think the plugin should check it)
# IRequestHandler methods def pre_process_request(self, req, handler): if not isinstance(handler, Chrome) and \ req.get_header('X-Requested-With') != 'XMLHttpRequest' and \ 'TRAC_DEVELOP' in req.perm: if self.log_handler not in self.log.handlers: self.log.addHandler(self.log_handler) req._tracdeveloper_hdlr = self.log_handler return handler
comment:6 Changed 10 years ago by
Replying to jun66j5:
/chrome
request (before the patch, the plugin doesn't show log view for the request)
Yeah that seems like an especially good idea. The additionally logging after t11905.2.patch (as shown in the screen captures), is usually just noise from the standpoint of the developer.
comment:8 Changed 9 years ago by
Owner: | changed from Olemis Lang to Jun Omae |
---|
Proposed patch in attachment:t11905.patch. The result is that we log a bit more than before. Screen captures below are from navigating to WikiStart with log level set to DEBUG.
1.0.2dev:
1.1.2dev