class Fluent::MixpanelOutputErrorHandler

Public Class Methods

new(logger) click to toggle source
# File lib/fluent/plugin/mixpanel_ruby_error_handler.rb, line 4
def initialize(logger)
  @logger = logger
end

Public Instance Methods

handle(error) click to toggle source
# File lib/fluent/plugin/mixpanel_ruby_error_handler.rb, line 8
def handle(error)
  # Default behavior is to not return an error. Mixpanel-ruby gem returns
  # true/false. If there is an error, an optional error handler is called.
  # In this case, here, we only want to log the error for future development
  # of error handling.
  @logger.error "MixpanelOutputErrorHandler:\n\tClass: #{error.class.to_s}\n\tMessage: #{error.message}\n\tBacktrace: #{error.backtrace}"
end