summaryrefslogtreecommitdiff
path: root/lib/chef/event_loggers
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/event_loggers')
-rw-r--r--lib/chef/event_loggers/base.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/event_loggers/base.rb b/lib/chef/event_loggers/base.rb
index 17fd6198ff..3c11e809f6 100644
--- a/lib/chef/event_loggers/base.rb
+++ b/lib/chef/event_loggers/base.rb
@@ -42,8 +42,8 @@ class Chef
end
def self.new(name)
- (event_logger_class = by_name(name.to_s)) ||
- raise(UnknownEventLogger, "No event logger found for #{name} (available: #{available_event_loggers.join(', ')})")
+ event_logger_class = by_name(name.to_s)
+ raise UnknownEventLogger, "No event logger found for #{name} (available: #{available_event_loggers.join(', ')})" unless event_logger_class
raise UnavailableEventLogger unless available_event_loggers.include? name.to_s
event_logger_class.new
end