Last active
November 21, 2018 09:06
-
-
Save troelskn/e5f9b182af4568826048 to your computer and use it in GitHub Desktop.
config/initializers/raven.rb
This file contains hidden or 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
require 'raven' | |
require 'rake/task' | |
if Rails.env.production? | |
Raven.configure do |config| | |
config.dsn = 'http://xxx:[email protected]/xxxxx' | |
end | |
module Rake | |
class Task | |
alias :orig_execute :execute | |
def execute(args = nil) | |
Raven.capture :logger => 'rake', :tags => { 'rake_task' => @name } do | |
orig_execute(args) | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment