diff options
author | danielsdeleo <dan@opscode.com> | 2013-02-24 20:43:55 -0800 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2013-02-27 11:12:15 -0800 |
commit | 634ad58ab14d6cfa05f56991bbc758cc3b22d410 (patch) | |
tree | fbcf778a5c03f7a27400352c0b3a7098c9471aef /lib/chef/log.rb | |
parent | b217dc3f2a80866d484a6cad33190dd321b3e2b7 (diff) | |
download | chef-634ad58ab14d6cfa05f56991bbc758cc3b22d410.tar.gz |
[CHEF-3935] Use stripped down lockless logger
Ruby's stdlib Logger wraps all IO in mutexes. Ruby 2.0 doesn't allow you
to request a lock in a trap handler because that could deadlock. This
commit fixes by replacing the Logger with a lock-free variant.
Diffstat (limited to 'lib/chef/log.rb')
-rw-r--r-- | lib/chef/log.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/log.rb b/lib/chef/log.rb index 7355ec7574..131d706a5e 100644 --- a/lib/chef/log.rb +++ b/lib/chef/log.rb @@ -18,6 +18,7 @@ # limitations under the License. require 'logger' +require 'chef/monologger' require 'mixlib/log' class Chef @@ -25,8 +26,7 @@ class Chef extend Mixlib::Log # Force initialization of the primary log device (@logger) - init - + init(MonoLogger.new(STDOUT)) class Formatter def self.show_time=(*args) |