Skip to content

Commit

Permalink
fixed event emitter problem missed during 0.14->1.0 update
Browse files Browse the repository at this point in the history
  • Loading branch information
Imron Alston committed Apr 19, 2018
1 parent 4d4f210 commit debc460
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.3
0.8.4
6 changes: 4 additions & 2 deletions lib/fluent/plugin/out_scalyr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module Scalyr
class ScalyrOut < Fluent::Plugin::Output
Fluent::Plugin.register_output( 'scalyr', self )
helpers :compat_parameters
helpers :event_emitter

config_param :api_write_token, :string
config_param :server_attributes, :hash, :default => nil
Expand Down Expand Up @@ -321,8 +322,9 @@ def build_add_events_body( chunk )
rescue JSON::GeneratorError, Encoding::UndefinedConversionError => e
$log.warn "#{e.class}: #{e.message}"

# Send the faulty event to a label @ERROR block and allow to handle it there (output to exceptions file for ex)
router.emit_error_event(tag, time, record, e)
# Send the faulty event to a label @ERROR block and allow to handle it there (output to exceptions file for ex)
time = Fluent::EventTime.new( sec, nsec )
router.emit_error_event(tag, time, record, e)

event[:attrs].each do |key, value|
$log.debug "\t#{key} (#{value.encoding.name}): '#{value}'"
Expand Down

0 comments on commit debc460

Please sign in to comment.