Module: Claret::Utils::Logging
- Included in:
- Rewriters::MethodArgIvarRewriter, Rewriters::MethodDefRewriter
- Defined in:
- lib/claret/utils/logging.rb
Instance Method Summary collapse
Instance Method Details
#debug(msg) ⇒ Object
10 11 12 |
# File 'lib/claret/utils/logging.rb', line 10 def debug(msg) logger.debug("#{self.class.name} > #{msg}") end |
#logger ⇒ Object
14 15 16 |
# File 'lib/claret/utils/logging.rb', line 14 def logger @logger ||= ::Logger.new($stdout, level: ENV.fetch("DEBUG", "").empty? ? Logger::INFO : Logger::DEBUG) end |
#say(msg) ⇒ Object
6 7 8 |
# File 'lib/claret/utils/logging.rb', line 6 def say(msg) logger.info("#{self.class.name} > #{msg}") end |