Module: Logging
- Included in:
- Wraith::CLI, Wraith::CompareImages, Wraith::CropImages, Wraith::FolderManager, Wraith::GalleryGenerator, Wraith::SaveImages, Wraith::Spider, Wraith::Validate, Wraith::Wraith
- Defined in:
- lib/wraith/helpers/logger.rb
Class Method Summary collapse
-
.logger ⇒ Object
Global, memoized, lazy initialized instance of a logger.
Instance Method Summary collapse
-
#logger ⇒ Object
This is the magical bit that gets mixed into your classes.
Class Method Details
.logger ⇒ Object
Global, memoized, lazy initialized instance of a logger
11 12 13 14 15 16 17 18 19 |
# File 'lib/wraith/helpers/logger.rb', line 11 def self.logger unless @logger @logger = Logger.new(STDOUT) @logger.formatter = proc do |severity, _datetime, _progname, msg| (severity == "INFO") ? "#{msg}\n" : "#{severity}: #{msg}\n" end end @logger end |