class StructuredEventLogger::JsonWriter

Attributes

io[R]

Public Class Methods

new(io) click to toggle source
# File lib/structured_event_logger/json_writer.rb, line 7
def initialize(io)
  @io = io
end

Public Instance Methods

call(scope, event, hash, record) click to toggle source
# File lib/structured_event_logger/json_writer.rb, line 11
def call(scope, event, hash, record)
  io.write(ActiveSupport::JSON.encode(record) + "\n")
end