class Wicoris::Postman::Logger
Public Class Methods
new()
click to toggle source
# File lib/wicoris/postman/logger.rb, line 4 def initialize STDOUT.sync = true end
Public Instance Methods
error(msg)
click to toggle source
# File lib/wicoris/postman/logger.rb, line 18 def error(msg) event = msg.merge( :level => :error, :timestamp => Time.now.iso8601 ) puts event.to_json end
info(msg)
click to toggle source
# File lib/wicoris/postman/logger.rb, line 8 def info(msg) event = msg.merge( :level => :info, :timestamp => Time.now.iso8601 ) puts event.to_json rescue JSON::ParserError puts event.inspect end