I tried to set up a simple access log in a new Pylons application,
using Pylons dev and Routes dev.

In middleware.py:

    app = PylonsApp(use_webob=True)

In BaseController:

    def __after__(self):
        if config["debug"]:
            import logging
            access = logging.getLogger("access").debug
            access("%s %s", response.status_int, request.url)

This worked fine for a few minutes, then i restarted the app and it says:


Module rlink.lib.base:29 in __after__
<<              import logging
                access = logging.getLogger("access").debug
                access("%s %s", response.status_int, request.url)>>
access("%s %s", response.status_int, request.url)
Module paste.registry:125 in __getattr__
<<
        def __getattr__(self, attr):
            return getattr(self._current_obj(), attr)

        def __setattr__(self, attr, value):>>  return
getattr(self._current_obj(), attr)
AttributeError: 'WSGIResponse' object has no attribute 'status_int'

Somehow it switched to WSGIResponse instead of webOb.Response, even
though use_webob is still true.

-- 
Mike Orr <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-devel" 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/pylons-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to