summaryrefslogtreecommitdiff
path: root/lib/mixlib/log.rb
diff options
context:
space:
mode:
authorRyan Davis <ryand-ruby@zenspider.com>2019-06-05 19:49:07 -0700
committerRyan Davis <ryand-ruby@zenspider.com>2019-06-06 13:36:29 -0700
commitc04defd313576d316497d38d63bf913cbc2fb013 (patch)
tree0eb2d5c2a884756bbff647a9deeeef802aeaa9fb /lib/mixlib/log.rb
parentd0dc22161e5d6da10581855b9a61fa277f291801 (diff)
downloadmixlib-log-c04defd313576d316497d38d63bf913cbc2fb013.tar.gz
Mode #logger a lazy initializer.
Otherwise the tests were resetting twice per. Signed-off-by: Ryan Davis <zenspider@chef.io>
Diffstat (limited to 'lib/mixlib/log.rb')
-rw-r--r--lib/mixlib/log.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mixlib/log.rb b/lib/mixlib/log.rb
index 599ac57..2d2653d 100644
--- a/lib/mixlib/log.rb
+++ b/lib/mixlib/log.rb
@@ -46,7 +46,7 @@ module Mixlib
# and creates a new one if it doesn't yet exist
##
def logger
- @logger || init
+ @logger ||= init
end
# Sets the log device to +new_log_device+. Any additional loggers