Created
September 17, 2020 05:03
-
-
Save brianr/30fe5afbdaede6503c0a98c0a3af5684 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ensure you have rollbar in your Gemfile, e.g.: gem 'rollbar' | |
require 'rollbar' | |
Rollbar.configure do |config| | |
# configure with your project access token (a post_server_item token from the rollbar setup UI) | |
config.access_token = 'your_token_here' | |
# To only log internal ERROR-level internal messages from rollbar-gem | |
config.logger_level = 'error' # default is 'info', meaning INFO and above | |
# To completely disable the internal rollbar-gem logger: | |
config.logger = Logger.new('/dev/null') | |
end | |
# Send a message to your Rollbar project | |
Rollbar.error('hello world') | |
puts 'script complete' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment