Sha256: 16f40af5f7c34d5f4520d2ba4304fe78b2b9373c18aeff25a53d765f6c01cc19

Contents?: true

Size: 581 Bytes

Versions: 6

Compression:

Stored size: 581 Bytes

Contents

require 'mixpanel-ruby'

class Fluent::MixpanelOutputErrorHandler < Mixpanel::ErrorHandler
   def initialize(logger)
     @logger = logger
   end

   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
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
fluent-plugin-mixpanel-0.1.0 lib/fluent/plugin/mixpanel_ruby_error_handler.rb
fluent-plugin-mixpanel-enchanced-0.0.13 lib/fluent/plugin/mixpanel_ruby_error_handler.rb
fluent-plugin-mixpanel-enchanced-0.0.12 lib/fluent/plugin/mixpanel_ruby_error_handler.rb
fluent-plugin-mixpanel-enchanced-0.0.11 lib/fluent/plugin/mixpanel_ruby_error_handler.rb
fluent-plugin-mixpanel-enchanced-0.0.10 lib/fluent/plugin/mixpanel_ruby_error_handler.rb
fluent-plugin-mixpanel-0.0.9 lib/fluent/plugin/mixpanel_ruby_error_handler.rb