Class: FloatyLogger
- Inherits:
-
Logger
- Object
- Logger
- FloatyLogger
- Defined in:
- lib/vmfloaty/logger.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ FloatyLogger
constructor
A new instance of FloatyLogger.
Constructor Details
#initialize ⇒ FloatyLogger
Returns a new instance of FloatyLogger.
20 21 22 23 24 25 26 |
# File 'lib/vmfloaty/logger.rb', line 20 def initialize super(STDERR) self.level = ::Logger::INFO self.formatter = proc do |severity, datetime, progname, msg| "#{msg}\n" end end |
Class Method Details
.error(msg) ⇒ Object
16 17 18 |
# File 'lib/vmfloaty/logger.rb', line 16 def self.error(msg) FloatyLogger.logger.error msg end |
.info(msg) ⇒ Object
8 9 10 |
# File 'lib/vmfloaty/logger.rb', line 8 def self.info(msg) FloatyLogger.logger.info msg end |
.logger ⇒ Object
4 5 6 |
# File 'lib/vmfloaty/logger.rb', line 4 def self.logger @@logger ||= FloatyLogger.new end |
.warn(msg) ⇒ Object
12 13 14 |
# File 'lib/vmfloaty/logger.rb', line 12 def self.warn(msg) FloatyLogger.logger.warn msg end |