Class: Consist::Commands::StreamLogger
- Inherits:
-
Object
- Object
- Consist::Commands::StreamLogger
- Defined in:
- lib/consist/commands/includes/stream_logger.rb
Instance Method Summary collapse
-
#initialize(log_level = :info) ⇒ StreamLogger
constructor
A new instance of StreamLogger.
- #on_data(_command, _stream_name, data, _channel) ⇒ Object
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 |