diff --git a/lib/miq_automation_engine/engine/miq_ae_engine.rb b/lib/miq_automation_engine/engine/miq_ae_engine.rb index 9b56bb51a..05e7c4ca5 100644 --- a/lib/miq_automation_engine/engine/miq_ae_engine.rb +++ b/lib/miq_automation_engine/engine/miq_ae_engine.rb @@ -8,9 +8,9 @@ module MiqAeEngine DEFAULT_ATTRIBUTES = %w( User::user MiqServer::miq_server object_name ) def self.instantiate(uri, user) - $miq_ae_logger.info("MiqAeEngine: Instantiating Workspace for URI=#{uri}") + $miq_ae_logger.info("MiqAeEngine: Instantiating Workspace for URI=#{MiqPassword.sanitize_encoded_string(uri)}") workspace, t = Benchmark.realtime_block(:total_time) { MiqAeWorkspaceRuntime.instantiate(uri, user) } - $miq_ae_logger.info("MiqAeEngine: Instantiating Workspace for URI=#{uri}...Complete - Counts: #{format_benchmark_counts(t)}, Timings: #{format_benchmark_times(t)}") + $miq_ae_logger.info("MiqAeEngine: Instantiating Workspace for URI=#{MiqPassword.sanitize_encoded_string(uri)}...Complete - Counts: #{format_benchmark_counts(t)}, Timings: #{format_benchmark_times(t)}") workspace end @@ -78,7 +78,7 @@ def self.deliver(*args) begin miq_task&.state_active object_name = "#{options[:object_type]}.#{options[:object_id]}" - _log.info("Delivering #{options[:attrs].inspect} for object [#{object_name}] with state [#{state}] to Automate") + _log.info("Delivering #{MiqPassword.sanitize_string(options[:attrs].inspect)} for object [#{object_name}] with state [#{state}] to Automate") automate_attrs = automate_attrs_from_options(options) if options[:object_type] @@ -92,7 +92,7 @@ def self.deliver(*args) ws = resolve_automation_object(uri, user_obj) if ws.nil? || ws.root.nil? - message = "Error delivering #{options[:attrs].inspect} for object [#{object_name}] with state [#{state}] to Automate: Empty Workspace" + message = "Error delivering #{MiqPassword.sanitize_string(options[:attrs].inspect)} for object [#{object_name}] with state [#{state}] to Automate: Empty Workspace" _log.error(message) return nil end @@ -105,7 +105,7 @@ def self.deliver(*args) deliver_on = Time.now.utc + ae_retry_interval change_options_by_ws(options, ws) - message = "Requeuing #{options.inspect} for object [#{object_name}] with state [#{options[:state]}] to Automate for delivery in [#{ae_retry_interval}] seconds" + message = "Requeuing #{MiqPassword.sanitize_string(options.inspect)} for object [#{object_name}] with state [#{options[:state]}] to Automate for delivery in [#{ae_retry_interval}] seconds" _log.info(message) queue_options = {:deliver_on => deliver_on} queue_options[:server_guid] = MiqServer.my_guid if ws.root['ae_retry_server_affinity'] diff --git a/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_domain_search.rb b/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_domain_search.rb index 17986e1ee..dce41d914 100644 --- a/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_domain_search.rb +++ b/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_domain_search.rb @@ -57,7 +57,7 @@ def find_first_fq_domain(uri, ns, klass, instance, method) if matching_domain parts[0] = matching_domain updated_ns = parts.join('/') - $miq_ae_logger.info("Updated namespace [#{uri} #{updated_ns}]") + $miq_ae_logger.info("Updated namespace [#{MiqPassword.sanitize_encoded_string(uri)} #{updated_ns}]") end updated_ns end diff --git a/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_workspace_runtime.rb b/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_workspace_runtime.rb index c591c70d6..2986412c2 100644 --- a/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_workspace_runtime.rb +++ b/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_workspace_runtime.rb @@ -96,7 +96,7 @@ def varset(uri, value) end def instantiate(uri, user, root = nil) - $miq_ae_logger.info("Instantiating [#{uri}]") if root.nil? + $miq_ae_logger.info("Instantiating [#{MiqPassword.sanitize_encoded_string(uri)}]") if root.nil? @ae_user = user @dom_search.ae_user = user scheme, userinfo, host, port, registry, path, opaque, query, fragment = MiqAeUri.split(uri, "miqaedb") diff --git a/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service.rb b/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service.rb index a6a77a302..2ceac12b3 100644 --- a/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service.rb +++ b/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service.rb @@ -69,7 +69,7 @@ def disconnect_sql def log(level, msg) Thread.current["tracking_label"] = @tracking_label - $miq_ae_logger.send(level, " #{msg}") + $miq_ae_logger.send(level, " #{MiqPassword.sanitize_string(msg)}") end def set_state_var(name, value)