Log sensitive data using debug log level
For production installation deployer should change Astute log level from debug to info to hide sensitive data: logins, passwords, tokens, ssh keys and so on. DocImpact Change-Id: I6c447e649b5b9eb589bdaa35d5f80e1fbfaa02dc Closes-Bug: #1588452 Related-Bug: #1410207
This commit is contained in:
parent
19a752426c
commit
4c93ff6905
|
@ -78,7 +78,7 @@ Astute.logger.formatter = proc do |severity, datetime, progname, msg|
|
|||
"#{datetime.strftime("%Y-%m-%d %H:%M:%S")} #{severity_map[severity]} [#{Process.pid}] #{msg}\n"
|
||||
end
|
||||
|
||||
Astute.logger.info "Starting with settings\n#{Astute.config.to_yaml}"
|
||||
Astute.logger.debug "Starting with settings\n#{Astute.config.to_yaml}"
|
||||
|
||||
Raemon::Master.start(options.workers, Astute::Server::Worker,
|
||||
:detach => options.daemonize,
|
||||
|
|
|
@ -18,7 +18,8 @@ module Astute
|
|||
raise "Settings for Cobbler must be set" if engine_attrs.blank?
|
||||
|
||||
begin
|
||||
Astute.logger.info("Trying to instantiate cobbler engine:\n#{engine_attrs.pretty_inspect}")
|
||||
Astute.logger.debug("Trying to instantiate cobbler engine:"\
|
||||
"\n#{engine_attrs.pretty_inspect}")
|
||||
@engine = Astute::Provision::Cobbler.new(engine_attrs)
|
||||
rescue => e
|
||||
Astute.logger.error("Error occured during cobbler initializing")
|
||||
|
|
|
@ -24,7 +24,7 @@ module Astute
|
|||
|
||||
def process
|
||||
@nailgun_hooks.sort_by { |f| f['priority'] }.each do |hook|
|
||||
Astute.logger.info "Run hook #{hook.to_yaml}"
|
||||
Astute.logger.debug "Run hook #{hook.to_yaml}"
|
||||
|
||||
time_start = Time.now.to_i
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ module Astute
|
|||
|
||||
def provision(data, provision_method)
|
||||
|
||||
Astute.logger.info("'provision' method called with data:\n"\
|
||||
Astute.logger.debug("'provision' method called with data:\n"\
|
||||
"#{data.pretty_inspect}")
|
||||
|
||||
reporter = create_reporter(data)
|
||||
|
@ -63,7 +63,7 @@ module Astute
|
|||
end
|
||||
|
||||
def deploy(data)
|
||||
Astute.logger.info("'deploy' method called with data:\n"\
|
||||
Astute.logger.debug("'deploy' method called with data:\n"\
|
||||
"#{data.pretty_inspect}")
|
||||
|
||||
reporter = create_reporter(data)
|
||||
|
@ -84,7 +84,7 @@ module Astute
|
|||
end
|
||||
|
||||
def granular_deploy(data)
|
||||
Astute.logger.info("'granular_deploy' method called with data:\n"\
|
||||
Astute.logger.debug("'granular_deploy' method called with data:\n"\
|
||||
"#{data.pretty_inspect}")
|
||||
|
||||
reporter = create_reporter(data)
|
||||
|
@ -106,7 +106,7 @@ module Astute
|
|||
end
|
||||
|
||||
def task_deploy(data)
|
||||
Astute.logger.info("'task_deploy' method called with data:\n"\
|
||||
Astute.logger.debug("'task_deploy' method called with data:\n"\
|
||||
"#{data.pretty_inspect}")
|
||||
|
||||
Thread.current[:gracefully_stop] = false
|
||||
|
@ -273,7 +273,7 @@ module Astute
|
|||
task_uuid = data['args']['task_uuid']
|
||||
|
||||
new_task_data = data_for_rm_nodes(data)
|
||||
Astute.logger.info("Replace running task #{target_task_uuid} to "\
|
||||
Astute.logger.debug("Replace running task #{target_task_uuid} to "\
|
||||
"new #{task_uuid} with data:\n"\
|
||||
"#{new_task_data.pretty_inspect}")
|
||||
service_data[:tasks_queue].replace_task(
|
||||
|
|
Loading…
Reference in New Issue