Add central logging for all actions done
log file "user_management.log" Each line is [YYYY-MM-DD HH:mm:ss] [script name] [TEST] ... [TEST] is only set if we are in a test run for create user, if info flag is set, we do not write a log
This commit is contained in:
@@ -76,7 +76,7 @@ account_id=$(echo "${instance_data}" | jq .accountId)
|
||||
region=$(echo "${instance_data}" | jq .region)
|
||||
|
||||
if [ "${OUTPUT_TARGET}" = "text" ]; then
|
||||
LOG="${LOG}/check_ssh_user.$(date +"%F_%H%m%S").log";
|
||||
LOG="${LOG}/check_ssh_user.$(date +"%F_%H%M%S").log";
|
||||
exec &> >(tee -a "${LOG}");
|
||||
echo "[START] =============>";
|
||||
echo "AWS ID : ${account_id}";
|
||||
|
||||
Reference in New Issue
Block a user