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

Rollbar logger #417

Merged
merged 6 commits into from
Apr 8, 2016
Merged

Rollbar logger #417

merged 6 commits into from
Apr 8, 2016

Conversation

jondeandres
Copy link
Contributor

This PR provides the class Rollbar::Logger that inherits from Logger and can be used to log the application messages to Rollbar using a logger interface.

Usage:

require 'rollbar/logger'

logger = Rollbar::Logger.new

logger.info('Something happened!')

This looks like using just Rollbar.info for the same, but, if using Rails, you can extend Rails.logger so all the Rails log is sent to Rollbar. By default messages with severity >= ERROR. Usage in a Rails initializer:

require 'rollbar/logger'

Rails.logger.extend(ActiveSupport::Logger.broadcast(Rollbar::Logger.new))

@jondeandres jondeandres merged commit 009de54 into master Apr 8, 2016
@jondeandres jondeandres deleted the rollbar-logger branch April 8, 2016 15:10
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