Project

General

Profile

« Previous | Next » 

Revision e0910b7e

Added by Michael Moll almost 6 years ago

Fixes #23857 - Fix Performance/InefficientHashSearch cop

View differences:

lib/foreman/logging.rb
options.assert_valid_keys :level, :logger
logger_name = options[:logger] || 'app'
level = options[:level] || :warn
unless ::Logging::LEVELS.keys.include?(level.to_s)
unless ::Logging::LEVELS.key?(level.to_s)
raise "Unexpected log level #{level}, expected one of #{::Logging::LEVELS.keys}"
end
# send class, message and stack as structured fields in addition to message string

Also available in: Unified diff