Module: Bakery::Log
- Defined in:
- lib/bakery/detail/log.rb
Class Method Summary collapse
-
.debug(msg) ⇒ Object
output if debugging.
-
.error(msg) ⇒ Object
output all the time.
-
.info(msg) ⇒ Object
output if verbose.
- .puts(msg) ⇒ Object
-
.warning(msg) ⇒ Object
output if not quiet.
Class Method Details
.debug(msg) ⇒ Object
output if debugging
40 41 42 |
# File 'lib/bakery/detail/log.rb', line 40 def debug msg print 'DEBUG', msg if DEBUG end |
.error(msg) ⇒ Object
output all the time
30 31 32 |
# File 'lib/bakery/detail/log.rb', line 30 def error msg print 'ERROR', msg end |
.info(msg) ⇒ Object
output if verbose
35 36 37 |
# File 'lib/bakery/detail/log.rb', line 35 def info msg print 'INFO', msg if VERBOSE end |
.puts(msg) ⇒ Object
20 21 22 |
# File 'lib/bakery/detail/log.rb', line 20 def puts msg $stderr.puts msg end |
.warning(msg) ⇒ Object
output if not quiet
25 26 27 |
# File 'lib/bakery/detail/log.rb', line 25 def warning msg print 'WARNING', msg unless QUIET end |