On Saturday, June 15, 2013 12:04:12 PM UTC-4, Alexandre Conrad wrote:
>
> Today, I don't subclass the request object but I rather use a reify'ed 
> "add_request_method" to the request object on a Pyramid NewRequest event:
>
>> Funny, the first thing I said when I saw your subclass code was "This 
would be so much easier with a NewRequest subscriber and add_request_method.

In terms of logging, I prefer using a middleware route myself.  I just 
liked being able to more cleanly wrap things ( than use a subscriber + 
callback )

I use 2 middlewares:

   https://gist.github.com/jvanasco/5790016

1- log request timing to statsd
2- a more customized version of the pyramid_exclog tween. i didn't like the 
log format, so i just re-implemented the package myself.  

My concern would be for blocking ( slow connections, host down, timeouts, 
etc ).  You want to try, as best as possible, to hand off the request and 
then ping the servers.  I'd love to know the best way to handle that.

I haven't looked much at logging to external services -- i decided to run 
everything internally.  I use statsd because it's not blocking (udp) and 
has a server that collects data before periodic flushes ;  and scribe (the 
facebook project) because it runs local and is lightweight.


A lot of logging systems also have a "pipeline" mode that will bunch 
together all the data and send in as few requests/packets as possible. 

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to