Class: Fluent::MessagePackRPCInput::Server

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent/plugin/in_msgpack_rpc.rb

Instance Method Summary collapse

Instance Method Details

#log(tag, time, record) ⇒ Object



50
51
52
53
54
# File 'lib/fluent/plugin/in_msgpack_rpc.rb', line 50

def log(tag, time, record)
  time = Engine.now if time == 0
  Engine.emit(tag, time, record)
  nil
end

#logs(tag, entries) ⇒ Object



56
57
58
59
60
61
62
63
# File 'lib/fluent/plugin/in_msgpack_rpc.rb', line 56

def logs(tag, entries)
  current = Engine.now
  # TODO: need type validation for entries?
  Engine.emit_array(tag, entries.map { |e|
    e[0] = current if e[0] == 0
    e
  })
end