Nope, haven't needed it yet. This case is a bit special because I want
unique routes, but I want to filter out query string values (and ids
in urls).
I think you have my original question more or less correct. I want to
know how the app is being used, so when I rewrite it using Pyramid, I
can make
You don't log requests already? Here is one:
http://pythonpaste.org/modules/translogger.html
Perhaps the format could just log the path without having to do any text
processing on the file.
I thought your original question was more like 'print out all the routes'
without making requests to the ap
Thanks Alice. I wasn't sure how to insert/structure middleware, but
this page helped:
http://wiki.pylonshq.com/display/pylonscookbook/Adding+your+own+middleware
My solution looks roughly like this:
class RequestLogger(object):
"""WSGI middleware to log all requests."""
def __init__(self,
Create a small bit of middleware to log the environ['REQUEST_URI'] (or
other value, as appropriate) of each GET. You can then direct that
logger to output to a file, another handler (i.e. you could write one
which logs to your database of choice and de-duplicates), etc.
Logging to a file then
D'oh!
I should have specified that I'm using Pylons 0.96 for this particular
application.
Thanks,
Alec
On May 10, 3:51 pm, Jasper van den Bosch wrote:
> If you use traversal, perhaps in the constructor of your Root resource?
>
> On 10 May 2011 20:40, Alec Munro wrote:
>
>
>
>
>
>
>
> > Hi list
If you use traversal, perhaps in the constructor of your Root resource?
On 10 May 2011 20:40, Alec Munro wrote:
> Hi list,
>
> I want to create a map of all the requests to an application, to make
> it easier to refactor it without breaking it's interfaces. What's the
> easiest place to add a fu
Hi list,
I want to create a map of all the requests to an application, to make
it easier to refactor it without breaking it's interfaces. What's the
easiest place to add a function to be called for every request?
Thanks,
Alec
--
You received this message because you are subscribed to the Google