ruby
ruby copied to clipboard
Unify log-level helper methods behavior.
Logdna::Ruby logger overrides its parent Logger class behavior for helper methods such as #info?.
It also defines a 5th level TRACE that seems to be the same as Loger::Severity::UNKNOWN.
So I've decided to rewrite the overridden methods because it makes Logdna::Ruby logger incompatible with, for example, Rails. For example ActionController::LogSubscriber https://github.com/rails/rails/blob/v5.2.1/actionpack/lib/action_controller/log_subscriber.rb#L8 is only logging responses when severity is set to below INFO. But the Logdna::Ruby#info? returns false even if the log level has been set to DEBUG.