Module: PicFisher::Log
- Defined in:
- lib/picfisher/log.rb
Overview
Print a message to the console
Class Method Summary collapse
- .debug(message) ⇒ Object
- .error(message) ⇒ Object
- .info(message) ⇒ Object
- .output(level, message) ⇒ Object
Class Method Details
.debug(message) ⇒ Object
12 13 14 |
# File 'lib/picfisher/log.rb', line 12 def self.debug() output(:debug, ) if ["debug"].include? debug_level end |
.error(message) ⇒ Object
20 21 22 |
# File 'lib/picfisher/log.rb', line 20 def self.error() output(:error, ) if %w[debug info error].include? debug_level end |
.info(message) ⇒ Object
16 17 18 |
# File 'lib/picfisher/log.rb', line 16 def self.info() output(:info, ) if %w[debug info].include? debug_level end |
.output(level, message) ⇒ Object
24 25 26 27 |
# File 'lib/picfisher/log.rb', line 24 def self.output(level, ) = "PicFisher [#{level.upcase}] #{}" Kernel.puts() end |