class Semlogr::Sinks::Console
Public Class Methods
new(formatter: nil)
click to toggle source
# File lib/semlogr/sinks/console.rb, line 8 def initialize(formatter: nil) @formatter = formatter || Formatters::TextFormatter.new end
Public Instance Methods
emit(log_event)
click to toggle source
# File lib/semlogr/sinks/console.rb, line 12 def emit(log_event) output = @formatter.format(log_event) STDOUT.write(output) end