0.0
No commit activity in last 3 years
No release in over 3 years
Gem allow easy observation of network communication in ruby via ruby network library. It is useful to log low level information for abstract layers like ActiveResource. It contain predefined observers for logging and to remember last request.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
 Project Readme

Description

Net Observer lets you observe outgoing Net::HTTP requests that your Ruby application makes. This can be useful when it fails at the remote end and you want to report the exact request that caused the problem.

Documentation

Create a NetObserver::Logger instance to log the requests and reponse. Use the NetObserver::Base class to observe the requests in another way.

Examples

This:

require "net_observer"
require "logger"

log = Logger.new(STDOUT)
net_logger = NetObserver::Logger.new log
Net::HTTP.get URI.parse("http://google.com/search?q=wikipedia")

produces:

I, [2010-12-14T12:42:50.570907 #23968]  INFO -- : get request for url http://google.com:80/search?q=wikipedia with method: GET with body 
W, [2010-12-14T12:42:50.579045 #23968]  WARN -- : get response: #<Net::HTTPForbidden 403 Forbidden readbody=true> with body <html><head>[...]

Development

NetObserver was conceived by Josef Reidinger.

The repository is at GitHub: https://github.com/mvidner/net-observer.