Sha256: 57fc3361246371cdfece9e21e978e717a94aaa74cf4a5f103fae650a53856cab
Contents?: true
Size: 577 Bytes
Versions: 2
Compression:
Stored size: 577 Bytes
Contents
module Fluent class MqttOutput < Output require 'fluent/plugin/mqtt_output_mixin' include Fluent::MqttOutputMixin # First, register the plugin. NAME is the name of this plugin # and identifies the plugin in the configuration file. Fluent::Plugin.register_output('mqtt', self) def emit(tag, es, chain) es.each {|time,record| $log.debug "#{tag}, #{format_time(time)}, #{record}" @connect.publish(rewrite_tag(tag), record.merge(@time_key => format_time(time)).to_json) } $log.flush chain.next end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fluent-plugin-mqtt-io-0.0.2 | lib/fluent/plugin/out_mqtt.rb |
fluent-plugin-mqtt-io-0.0.1 | lib/fluent/plugin/out_mqtt.rb |