Module: Eaternet::Loggable

Included in:
Agencies::Nyc
Defined in:
lib/eaternet/loggable.rb

Instance Method Summary collapse

Instance Method Details

#create_loggerObject


8
9
10
11
12
13
# File 'lib/eaternet/loggable.rb', line 8

def create_logger
  logger = Logger.new(ENV['EATERNET_LOG_FILE'] || $stderr)
  logger.datetime_format = '%Y-%m-%d %H:%M:%S'
  logger.progname = 'Eaternet'
  logger
end

#loggerObject


4
5
6
# File 'lib/eaternet/loggable.rb', line 4

def logger
  @logger ||= create_logger
end