Class: Consist::Commands::StreamLogger

Inherits:
Object
  • Object
show all
Defined in:
lib/consist/commands/includes/stream_logger.rb

Instance Method Summary collapse

Constructor Details

#initialize(log_level = :info) ⇒ StreamLogger

Returns a new instance of StreamLogger.



6
7
8
# File 'lib/consist/commands/includes/stream_logger.rb', line 6

def initialize(log_level = :info)
  @log_level = log_level
end

Instance Method Details

#on_data(_command, _stream_name, data, _channel) ⇒ Object



10
11
12
# File 'lib/consist/commands/includes/stream_logger.rb', line 10

def on_data(_command, _stream_name, data, _channel)
  log(data)
end