lib/fluent/plugin/in_sendgrid_event.rb in fluent-plugin-sendgrid-event-0.0.6 vs lib/fluent/plugin/in_sendgrid_event.rb in fluent-plugin-sendgrid-event-0.0.7
- old
+ new
@@ -16,10 +16,14 @@
config_param :request_uri, :string, :default => "/"
unless method_defined?(:log)
define_method("log") { $log }
end
+
+ unless method_defined?(:router)
+ define_method("router") { Fluent::Engine }
+ end
def initialize
super
end
@@ -99,9 +103,9 @@
@server.start
end # The end of run method
def emit_event(event)
log.trace "in_sendgrid_event: emit_event"
- Engine.emit("#{tag}", Engine.now, event)
+ router.emit("#{tag}", Fluent::EventTime.now, event)
end
end
end