Module: LaunchpadMk2::Logging

Included in:
Device, Interaction
Defined in:
lib/launchpad_mk2/logging.rb

Overview

This module provides logging facilities. Just include it to be able to log stuff.

Instance Method Summary collapse

Instance Method Details

#loggerObject

Returns the logger to be used by the current instance.

Returns:

the logger set externally or a logger that swallows everything



14
15
16
# File 'lib/launchpad_mk2/logging.rb', line 14

def logger
  @logger ||= Logger.new(nil)
end

#logger=(logger) ⇒ Object

Sets the logger to be used by the current instance.

logger

the [Logger] instance



21
22
23
# File 'lib/launchpad_mk2/logging.rb', line 21

def logger=(logger)
  @logger = logger
end