Module: Aebus::Logging
- Included in:
- Core
- Defined in:
- lib/aebus/logging.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.log_to_file(file) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/aebus/logging.rb', line 15 def self.log_to_file(file) begin @logger = Logger.new(file, 'daily') rescue Errno::EACCES => e logger.warn("Could not create log file, '#{e.}'. Defaulting to STDOUT") end end |
.logger ⇒ Object
11 12 13 |
# File 'lib/aebus/logging.rb', line 11 def self.logger @logger ||= Logger.new(STDOUT) end |