Class: Log
- Inherits:
-
Object
- Object
- Log
- Defined in:
- lib/hodmin/hodmin_tools.rb
Overview
Defines a comfortable way to use logging.
Class Method Summary collapse
Class Method Details
.log ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/hodmin/hodmin_tools.rb', line 3 def self.log if @logger.nil? log = case configatron.logging.logdestination when 'STDOUT' then STDOUT when 'nil' then nil else configatron.logging.logdestination.to_s end @logger = Logger.new(log) @logger.level = Logger::DEBUG @logger.datetime_format = '%Y-%m-%d %H:%M:%S ' end @logger end |