Module: Armrest::Logging

Extended by:
Logging
Included in:
Api::Mods, Auth, Logging
Defined in:
lib/armrest/logging.rb

Constant Summary collapse

@@logger =
nil

Instance Method Summary collapse

Instance Method Details

#default_loggerObject

Note the Armrest logger on debug is pretty verbose so think it may be better to not assign the Armrest::Logging.logger = Terraspace.logger



14
15
16
17
18
# File 'lib/armrest/logging.rb', line 14

def default_logger
  logger = Armrest::Logger.new($stderr)
  logger.level = ENV['ARMREST_LOG_LEVEL'] ? ENV['ARMREST_LOG_LEVEL'] : :info
  logger
end

#loggerObject



4
5
6
# File 'lib/armrest/logging.rb', line 4

def logger
  @@logger ||= default_logger
end

#logger=(v) ⇒ Object



8
9
10
# File 'lib/armrest/logging.rb', line 8

def logger=(v)
  @@logger = v
end