Class: Vagrant::Util::PlainLogger
- Inherits:
-
Logger
- Object
- Logger
- Vagrant::Util::PlainLogger
- Defined in:
- lib/vagrant/util/plain_logger.rb
Overview
Subclass of the standard library logger which has no format on its own. The message sent to the logger is outputted as-is.
Instance Method Summary collapse
-
#add(*args) ⇒ Object
This is the method which is called for all debug, info, error, etc.
- #format_message(level, time, progname, msg) ⇒ Object
Instance Method Details
#add(*args) ⇒ Object
This is the method which is called for all debug, info, error, etc. methods by the logger. This is overriden to verify that the output is always flushed.
Logger by default syncs all log devices but this just verifies it is truly flushed.
14 15 16 17 |
# File 'lib/vagrant/util/plain_logger.rb', line 14 def add(*args) super @logdev.dev.flush if @logdev end |
#format_message(level, time, progname, msg) ⇒ Object
19 20 21 22 |
# File 'lib/vagrant/util/plain_logger.rb', line 19 def (level, time, progname, msg) # We do no formatting, its up to the user "#{msg}\n" end |