Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GrapeLogging::Formatters::Rails. Updates to README #47

Merged
merged 1 commit into from
Apr 19, 2018
Merged

Add GrapeLogging::Formatters::Rails. Updates to README #47

merged 1 commit into from
Apr 19, 2018

Conversation

daveharris
Copy link
Contributor

@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:

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.

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 daveharris changed the title Add GrapeLogging::Formatters::RailsFormatter.new. Updates to README Add GrapeLogging::Formatters::Rails. Updates to README Mar 2, 2018
@aserafin
Copy link
Owner

@daveharris great addition and thanks for the output documentation for other formatters 💪

@aserafin aserafin merged commit 7ae51d3 into aserafin:master Apr 19, 2018
@daveharris daveharris deleted the feature/rails-formatter branch August 15, 2018 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants