You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to add some logging to the Client class. For each request the client makes, we should output a detailed debug message to a logger of some sort. I really like how Tire does it; logging a curl command that you can copy/paste and use directly. Also, outputting the status code of the response would be good, too ...
We need to add some logging to the Client class. For each request the client makes, we should output a detailed debug message to a logger of some sort. I really like how Tire does it; logging a curl command that you can copy/paste and use directly. Also, outputting the status code of the response would be good, too ...
@TwP do you like the way tire has a module-level logger instance? Should we add Elastomer.logger? Since you are well versed in all things logging I figure you'll probably know best how to add lightweight logging to a library.
The idea behind polylog is that each library requests a logging instance from Polylog, and the application then configures Polylog to hand out the type of logger that it wants to use. So you only need to configure a logger in one location. Every library then grabs that logger and uses it.
This is akin to SLF4J, but with a much more pronounceable name.
Activity
wfarr commentedon Apr 20, 2013
IMO, http requests with bodies should be a level of logging but likely not the default.
As far as logging request bodies goes, strip new lines and compress multiple spaces into a single space.
On Sat, Apr 20, 2013 at 6:20 PM, Tim Pease notifications@github.com
wrote:
grantr commentedon Apr 22, 2013
Maybe the client can take a :verbose level or :trace => true option that increases the logging level to include requests and responses?
grantr commentedon Apr 22, 2013
We can't require activesupport for the low level client, but at a higher level we should use ActiveSupport::Notifications and a LogSubscriber.
wfarr commentedon Apr 22, 2013
I'd much prefer to keep it in UNIX convention and offer info, error, debug, etc log levels.
On Mon, Apr 22, 2013 at 11:05 AM, Grant Rodgers notifications@github.com
wrote:
grantr commentedon Aug 27, 2013
Picking this back up.
@TwP do you like the way tire has a module-level logger instance? Should we add
Elastomer.logger? Since you are well versed in all things logging I figure you'll probably know best how to add lightweight logging to a library.TwP commentedon Aug 28, 2013
Given ∞ time, I would much rather use https://github.com/TwP/polylog
The idea behind polylog is that each library requests a logging instance from Polylog, and the application then configures Polylog to hand out the type of logger that it wants to use. So you only need to configure a logger in one location. Every library then grabs that logger and uses it.
This is akin to SLF4J, but with a much more pronounceable name.