Module: Logification::Helpers::LoggingMethods
- Included in:
- Logger
- Defined in:
- lib/logification/helpers/logging_methods.rb
Constant Summary collapse
- TAB =
" "
Instance Method Summary collapse
- #debug(msg = nil) ⇒ Object
- #error(msg = nil) ⇒ Object
- #fatal(msg = nil) ⇒ Object
- #info(msg = nil) ⇒ Object
- #warn(msg = nil) ⇒ Object
Instance Method Details
#debug(msg = nil) ⇒ Object
9 10 11 12 |
# File 'lib/logification/helpers/logging_methods.rb', line 9 def debug(msg=nil) msg = yield if block_given? (:debug, msg, :green) end |
#error(msg = nil) ⇒ Object
24 25 26 27 |
# File 'lib/logification/helpers/logging_methods.rb', line 24 def error(msg=nil) msg = yield if block_given? (:error, msg, :red) end |
#fatal(msg = nil) ⇒ Object
29 30 31 32 |
# File 'lib/logification/helpers/logging_methods.rb', line 29 def fatal(msg=nil) msg = yield if block_given? (:fatal, msg, :magenta) end |
#info(msg = nil) ⇒ Object
14 15 16 17 |
# File 'lib/logification/helpers/logging_methods.rb', line 14 def info(msg=nil) msg = yield if block_given? (:info, msg, :cyan) end |
#warn(msg = nil) ⇒ Object
19 20 21 22 |
# File 'lib/logification/helpers/logging_methods.rb', line 19 def warn(msg=nil) msg = yield if block_given? (:warn, msg, :yellow) end |