-
Notifications
You must be signed in to change notification settings - Fork 145
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
Use Honeybadger logging.level setting when logging to Rails log #375
Comments
Perhaps an internal check before calling the logging methods? For example: if config.logging_level <= Logging::INFO
logger.info(sprintf('Initializing Honeybadger Error Tracker for Ruby. Ship it! version=%s framework=%s', Honeybadger::VERSION, detected_framework))
end Something like that for an internal check before calling the logger? The helpers in the "Logging" module would also have to be updated to have the log_level check I imagine. |
@KonnorRogers yeah, I was thinking that we could probably add the suppression to the logging module so that it would just skip sending the log to the logger if our internal level is lower. We have a complicated logging setup. 😂 |
Isn't this an anti-pattern though? I mean the whole point for calling a specific logging level method ( |
We share the Rails logger by default, but you can also configure a separate Honeybadger-specific logger. I think the best way to think about it is that our configured log level takes precedence, but only for our logs (when logging to the default Rails logger). |
See #296 for additional context. Currently, the
logging.level
setting only works whenlogging.path
(or a custom logger) is also configured. It would be nice iflogging.level
also applied to the default Rails logger, but only for Honeybadger. I think that people expectlogging.level
to work for Honeybadger logs regardless of where the output is being sent.The text was updated successfully, but these errors were encountered: