Sha256: 8444500633adab5d6b24c2801090acc08ecc687a89d3bceacb287d56139d187c
Contents?: true
Size: 1.21 KB
Versions: 11
Compression:
Stored size: 1.21 KB
Contents
module Vagrant module Util def self.included(base) base.extend Vagrant::Util end def wrap_output puts "=====================================================================" yield puts "=====================================================================" end def error_and_exit(key, data = {}) abort <<-error ===================================================================== Vagrant experienced an error! #{Errors.error_string(key, data).chomp} ===================================================================== error end def logger Logger.singleton_logger end end class Logger < ::Logger @@singleton_logger = nil class << self def singleton_logger # TODO: Buffer messages until config is loaded, then output them? if Vagrant.config.loaded? @@singleton_logger ||= Vagrant::Logger.new(Vagrant.config.vagrant.log_output) else Vagrant::Logger.new(nil) end end def reset_logger! @@singleton_logger = nil end end def format_message(level, time, progname, msg) "[#{level} #{time.strftime('%m-%d-%Y %X')}] Vagrant: #{msg}\n" end end end
Version data entries
11 entries across 11 versions & 3 rubygems