From 050677b3594dc32f8a22d445f67fc04ff33ffe50 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 10 Jul 2011 14:44:48 -0700 Subject: [PATCH] ResourceLogger doesn't need to be thread-safe. Vagrant is not multi-threaded. --- lib/vagrant/util/resource_logger.rb | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/vagrant/util/resource_logger.rb b/lib/vagrant/util/resource_logger.rb index c1cc0439e..f8f644125 100644 --- a/lib/vagrant/util/resource_logger.rb +++ b/lib/vagrant/util/resource_logger.rb @@ -1,5 +1,3 @@ -require 'thread' - module Vagrant module Util # Represents a logger for a specific resource within Vagrant. Each @@ -9,11 +7,8 @@ module Vagrant # # [resource] message # - # This class is thread safe. The backing class which actually does - # all the logging IO is protected. class ResourceLogger @@singleton_logger = nil - @@writer_lock = Mutex.new # The resource which this logger represents. attr_reader :resource @@ -53,9 +48,7 @@ module Vagrant [:debug, :info, :error, :fatal].each do |method| define_method(method) do |message| - @@writer_lock.synchronize do - logger.send(method, "[#{resource}] #{message}") - end + logger.send(method, "[#{resource}] #{message}") end end end