Class: VagrantPlugins::Uplift::Log::UpliftLogger
- Inherits:
-
Logger
- Object
- Logger
- VagrantPlugins::Uplift::Log::UpliftLogger
- Defined in:
- lib/vagrant-uplift/log.rb
Overview
adding custom log levels stackoverflow.com/questions/2281490/how-to-add-a-custom-log-level-to-logger-in-ruby
Constant Summary collapse
- SEVS =
%w(DEBUG INFO WARN ERROR FATAL VERBOSE INFO_LIGHT)
Instance Method Summary collapse
- #format_severity(severity) ⇒ Object
- #info_light(progname = nil, &block) ⇒ Object
- #verbose(progname = nil, &block) ⇒ Object
Instance Method Details
#format_severity(severity) ⇒ Object
13 14 15 |
# File 'lib/vagrant-uplift/log.rb', line 13 def format_severity(severity) SEVS[severity] || 'ANY' end |
#info_light(progname = nil, &block) ⇒ Object
21 22 23 |
# File 'lib/vagrant-uplift/log.rb', line 21 def info_light(progname = nil, &block) add(6, nil, progname, &block) end |
#verbose(progname = nil, &block) ⇒ Object
17 18 19 |
# File 'lib/vagrant-uplift/log.rb', line 17 def verbose(progname = nil, &block) add(5, nil, progname, &block) end |