Closed daveharris closed 6 years ago
@aserafin I added this Formatter to get a line like the last line in a standard Rails app:
Rails:
Completed 200 OK in 958ms (Views: 951.1ms | ActiveRecord: 3.8ms)
After this change with formatter: GrapeLogging::Formatters::Rails.new:
formatter: GrapeLogging::Formatters::Rails.new
Completed 200 OK in 191ms (Views: 159.37ms | DB: 31.23ms)
I haven't found a way to determine the installed ORM so I had to change ActiveRecord to DB.
ActiveRecord
DB
I also cleaned up the README giving examples of each formatter and added some specs for my new formatter.
I have tested it in a real-life Rails+Grape app and works great.
I haven't submitted a PR before so let me know if there is anything else I need to do.
Thanks for the gem!
@daveharris great addition and thanks for the output documentation for other formatters 💪
@aserafin I added this Formatter to get a line like the last line in a standard Rails app:
Rails:
After this change with
formatter: GrapeLogging::Formatters::Rails.new
:I haven't found a way to determine the installed ORM so I had to change
ActiveRecord
toDB
.I also cleaned up the README giving examples of each formatter and added some specs for my new formatter.
I have tested it in a real-life Rails+Grape app and works great.
I haven't submitted a PR before so let me know if there is anything else I need to do.
Thanks for the gem!