Closed 987poiuytrewq closed 8 years ago
Really great! :+1:
Very nice! :+1:
@aserafin can it be merged?
thanks @987poiuytrewq for the awesome pull request. I've found few issues though:
GrapeLogging::Logger::Response.new
not GrapeLogging::Loggers::Response.new
"#<Rack::BodyProxy:0x007fabcdfd1738>"
which isn't very helpful. I assume you wanted to log the entire body there, right?Good catch - I've decided to with Loggers
for the module name as it more consistent with Formatters
.
I'm not sure why the body proxy isn't being turned into a string for you, as it seems to work for me. Looking at the source, https://github.com/rack/rack/blob/master/lib/rack/body_proxy.rb#L41 it seems to delegate all methods to the actual body so I've put in a to_s
that should work.
Great work :+1:
@aserafin hopefully this one could be merged soon.
Hi @aserafin is there anything I can do to get this merged in?
@aserafin rebased onto master
can you pls resolve the conflicts so this can be merged?
Hi, great work on creating this middleware, its a solid implementation of a generic logger for Grape.
After wanting some extra functionality in what you can log, I ended up refactoring the code to allow you to pick and choose what things you want to log. I also ended up moving the filtering work by @diguliu into an opt-in logging module while I was at it.
Please do let me know if you think something is done strangely, I'd like to get this into master and I'm happy to make any changes.