Module: Hutch::Logging
- Included in:
- Broker, CLI, ErrorHandlers::Airbrake, ErrorHandlers::Honeybadger, ErrorHandlers::Logger, ErrorHandlers::Sentry, Worker
- Defined in:
- lib/hutch/logging.rb
Defined Under Namespace
Classes: HutchFormatter
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.logger ⇒ Object
20 21 22 |
# File 'lib/hutch/logging.rb', line 20 def self.logger @logger || setup_logger end |
.logger=(logger) ⇒ Object
24 25 26 |
# File 'lib/hutch/logging.rb', line 24 def self.logger=(logger) @logger = logger end |
.setup_logger(target = $stdout) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/hutch/logging.rb', line 12 def self.setup_logger(target = $stdout) require 'hutch/config' @logger = Logger.new(target) @logger.level = Hutch::Config.log_level @logger.formatter = HutchFormatter.new @logger end |