monterail / guidelines

[DEPRECATED] We are Ruby on Rails experts from Poland. Think hussars. Solid & winged. These are our guidelines.
71 stars 17 forks source link

Override sentry logger level for staging #199

Closed teamon closed 10 years ago

teamon commented 10 years ago
# config/initializers/raven.rb

# Override logger level for staging
class Raven::Event
  class << self
    def from_exception_with_level_override(exc, options = {}, &block)
      options[:level] ||= ENV["SENTRY_LOG_LEVEL"]
      from_exception_without_level_override(exc, options, &block)
    end

    alias_method_chain :from_exception, :level_override
  end
end

To visually distinguish staging exceptions from production exceptions

szajbus commented 10 years ago

I like this.

jandudulski commented 10 years ago

Meh, not this way, please.

options[:level] ||= ENV['SENTRY_LOG_LEVEL']
teamon commented 10 years ago

True!!! Somuchprops! <3— Sent from iPhone

On Fri, Feb 21, 2014 at 11:54 PM, Jan Dudulski notifications@github.com wrote:

Meh, not this way, please.

options[:level] ||= ENV['SENTRY_LOG_LEVEL']

Reply to this email directly or view it on GitHub: https://github.com/monterail/guidelines/issues/199#issuecomment-35782507

teamon commented 10 years ago

@jandudulski plz review

jandudulski commented 10 years ago

fix typo and merge :wink: