-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Log formats silently changed between versions #353
Comments
…rror instead of returning a string representation of a response. Failing formatters will get reported with a 500.
Addresses issue ruby-grape#353 -- Log formats silently changed between versions The default log format changes after `require 'active_support/core_ext/logger'`, and of course `require active_support/all` brings in everything including loggers. To change the format back to the default for a particular logger, you can use `my_logger = Logger::Formatter.new`.
It turns out the ActiveSupport logger extensions ( I see two solutions:
I guess it boils down to whether Grape "has an opinion" on logging. What do you think? |
If Grape doesn't need all of ActiveSupport, it shouldn't require it. I'll take your PR. |
Addresses issue ruby-grape#353 -- Log formats silently changed between versions The default log format changes after `require 'active_support/core_ext/logger'`, and of course `require active_support/all` brings in everything including loggers. To change the format back to the default for a particular logger, you can use `my_logger = Logger::Formatter.new`.
See #354, fixed. |
The default Logger format seems to have changed between Grape v0.2.6 and v0.3.1 -- such that our logs stopped recording timestamp and log level information.
I'm not sure if the older version had the "right" behaviour and it's now broken, or whether we relied on an inappropriate default and were just lucky.
Using the wonderful
git bisect
, I narrowed it down to commit 11576c8 -- XML support for entitiies -- but I can't figure out what the relevant change is.ActiveSupport? i18n? Something else?
The text was updated successfully, but these errors were encountered: