Module: Ethon::Loggable
- Included in:
- Ethon
- Defined in:
- lib/ethon/loggable.rb
Overview
Contains logging behaviour.
Instance Method Summary collapse
-
#logger ⇒ Logger
Get the logger.
-
#logger=(logger) ⇒ Logger
Set the logger.
Instance Method Details
#logger ⇒ Logger
Note:
Will try to grab Rails’ logger first before creating a new logger with stdout.
Get the logger.
17 18 19 20 |
# File 'lib/ethon/loggable.rb', line 17 def logger return @logger if defined?(@logger) @logger = rails_logger || default_logger end |
#logger=(logger) ⇒ Logger
Set the logger.
30 31 32 |
# File 'lib/ethon/loggable.rb', line 30 def logger=(logger) @logger = logger end |