172
173
174
175
176
177
178
179
180
181
182
|
# File 'lib/chef/application.rb', line 172
def configure_logging
configure_log_location
logger.init(MonoLogger.new(chef_config[:log_location][0]))
chef_config[:log_location][1..].each do |log_location|
logger.loggers << MonoLogger.new(log_location)
end
logger.level = resolve_log_level
rescue StandardError => error
logger.fatal("Failed to open or create log file at #{chef_config[:log_location]}: #{error.class} (#{error.message})")
Chef::Application.fatal!("Aborting due to invalid 'log_location' configuration", error)
end
|