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

How to get "out of the box" lograge style logging. #4

Open
rromanchuk opened this issue Nov 27, 2017 · 1 comment
Open

How to get "out of the box" lograge style logging. #4

rromanchuk opened this issue Nov 27, 2017 · 1 comment

Comments

@rromanchuk
Copy link

I'm struggling to lograge style logging when using grape.

A standard log when using lograge should look like something like this
method=GET path=/jobs/833552.json format=json controller=JobsController action=show status=200 duration=58.33 view=40.43 db=15.26

In the README the example output looks like

Started GET "/v1/reports/101" at 2015-12-11 15:40:51 -0800
Processing by ReportsAPI#reports/:id
  Parameters: {"id"=>"101"}
Completed 200 in 6.29ms

I'm going to RTFM a bit more, but maybe someone can point me in the right direction? Wouldn't it make sense to use the same formatter lograge uses out of the box?

@rromanchuk
Copy link
Author

I think smart default would be to use this formatter https://github.com/roidrage/lograge/blob/master/lib/lograge/formatters/key_value.rb

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

No branches or pull requests

1 participant