Make log4r a first class dependency as we start to switch to it
This commit is contained in:
parent
282bf37350
commit
0a47c9d6fa
|
@ -1,3 +1,5 @@
|
|||
require "log4r"
|
||||
|
||||
module Vagrant
|
||||
module UI
|
||||
# Vagrant UIs handle communication with the outside world (typically
|
||||
|
@ -11,13 +13,14 @@ module Vagrant
|
|||
attr_accessor :env
|
||||
|
||||
def initialize(env)
|
||||
@env = env
|
||||
@env = env
|
||||
@logger = Log4r::Logger.new("vagrant::ui::interface")
|
||||
end
|
||||
|
||||
[:warn, :error, :info, :success].each do |method|
|
||||
define_method(method) do |message, *opts|
|
||||
# Log normal console messages
|
||||
env.logger.info("ui") { message }
|
||||
@logger.info { "#{method}: #{message}" }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ Gem::Specification.new do |s|
|
|||
s.add_dependency "archive-tar-minitar", "= 0.5.2"
|
||||
s.add_dependency "erubis", "~> 2.7.0"
|
||||
s.add_dependency "json", "~> 1.5.1"
|
||||
s.add_dependency "log4r", "~> 1.1.9"
|
||||
s.add_dependency "net-ssh", "~> 2.1.4"
|
||||
s.add_dependency "net-scp", "~> 1.0.4"
|
||||
s.add_dependency "i18n", "~> 0.6.0"
|
||||
|
@ -25,7 +26,6 @@ Gem::Specification.new do |s|
|
|||
|
||||
s.add_development_dependency "rake"
|
||||
s.add_development_dependency "contest", ">= 0.1.2"
|
||||
s.add_development_dependency "log4r", "~> 1.1.9"
|
||||
s.add_development_dependency "minitest", "~> 2.5.1"
|
||||
s.add_development_dependency "mocha"
|
||||
s.add_development_dependency "childprocess", "~> 0.2.3"
|
||||
|
|
Loading…
Reference in New Issue