Module: Logging

Included in:
Crubyflie, Crubyflie::Crazyflie, Crubyflie::Joystick, Crubyflie::Log, Crubyflie::Param, Crubyflie::TOC
Defined in:
lib/crubyflie/crubyflie_logger.rb

Overview

This module is included where needed and offers easy access to the logger

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.loggerCrubyflieLogger

Give me a logger

Returns:



26
27
28
# File 'lib/crubyflie/crubyflie_logger.rb', line 26

def self.logger
    Logging.logger
end

Instance Method Details

#loggerCrubyflieLogger

Lazy initialization for a logger

Returns:



32
33
34
# File 'lib/crubyflie/crubyflie_logger.rb', line 32

def logger
    @logger ||= CrubyflieLogger.new()
end

#logger=(logger) ⇒ Object

Set a logger

Parameters:



38
39
40
# File 'lib/crubyflie/crubyflie_logger.rb', line 38

def logger=(logger)
    @logger = logger
end