lib/semantic_logger/appender/bugsnag.rb in semantic_logger-4.2.2 vs lib/semantic_logger/appender/bugsnag.rb in semantic_logger-4.3.0
- old
+ new
@@ -27,16 +27,16 @@
# filter: [Regexp|Proc]
# RegExp: Only include log messages where the class name matches the supplied.
# regular expression. All other messages will be ignored.
# Proc: Only include log messages where the supplied Proc returns true
# The Proc must return true or false.
- def initialize(level: :error, formatter: nil, filter: nil, application: nil, host: nil, &block)
+ def initialize(level: :error, **args, &block)
raise 'Bugsnag only supports :info, :warn, or :error log levels' unless %i[info warn error fatal].include?(level)
# Replace the Bugsnag logger so that we can identify its log messages and not forward them to Bugsnag
::Bugsnag.configure { |config| config.logger = SemanticLogger[Bugsnag] }
- super(level: level, formatter: formatter, filter: filter, application: application, host: host, &block)
+ super(level: level, **args, &block)
end
# Returns [Hash] of parameters to send to Bugsnag.
def call(log, logger)
h = SemanticLogger::Formatters::Raw.new.call(log, logger)