lib/semantic_logger/appender/honeybadger.rb in semantic_logger-4.0.0 vs lib/semantic_logger/appender/honeybadger.rb in semantic_logger-4.1.0
- old
+ new
@@ -8,11 +8,11 @@
#
# Example:
# SemanticLogger.add_appender(appender: :honeybadger)
#
class SemanticLogger::Appender::Honeybadger < SemanticLogger::Subscriber
- # Create Appender
+ # Honeybadger Appender
#
# Parameters
# level: [:trace | :debug | :info | :warn | :error | :fatal]
# Override the log level for this appender.
# Default: :error
@@ -33,13 +33,11 @@
# Default: SemanticLogger.host
#
# application: [String]
# Name of this application to appear in log messages.
# Default: SemanticLogger.application
- def initialize(options = {}, &block)
- options = options.is_a?(Hash) ? options.dup : {level: options}
- options[:level] ||= :error
- super(options, &block)
+ def initialize(level: :error, formatter: nil, filter: nil, application: nil, host: nil, &block)
+ super(level: level, formatter: formatter, filter: filter, application: application, host: host, &block)
end
# Send an error notification to honeybadger
def log(log)
return false unless should_log?(log)