Module: Crab::Logging
- Included in:
- Utilities
- Defined in:
- lib/crab/logging.rb
Instance Method Summary collapse
Instance Method Details
#logger ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/crab/logging.rb', line 3 def logger $logger ||= Logger.new(STDERR) $logger.formatter = Logger::Formatter.new $logger.progname = 'crab' # TODO - make this a global command-line or config option: $logger.level = ENV['CRAB_LOG_LEVEL'].present? ? ENV['CRAB_LOG_LEVEL'].to_i : Logger::WARN $logger end |