Skip to content

Commit

Permalink
Enhance log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Scavo committed Jun 9, 2017
1 parent 07da7bb commit e0d5adf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bin/compute_vital_statistics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ fi

# specify temporary files
xml_path="${tmp_dir}/saml-metadata.xml"
json_out="${tmp_dir}/md_vital_statistics.json"
out_filename=md_vital_statistics.json
out_file="${tmp_dir}/$out_filename"

#######################################################################
# Functions
Expand All @@ -288,8 +289,6 @@ append_json_object () {
local untilInvalid=$( escape_special_json_chars "$untilInvalid" )
local sinceCreation=$( escape_special_json_chars "$sinceCreation" )

print_log_message -I "$script_name creating JSON object for metadata file: $metadataLocation"

/bin/cat <<- JSON_OBJECT
{
"metadataLocation": "$metadataLocation",
Expand Down Expand Up @@ -398,11 +397,12 @@ print_vital_statistics () {
print_log_message -I "$script_name BEGIN"

# create the JSON output
print_vital_statistics "$@" > "$json_out"
print_vital_statistics "$@" > "$out_file"
print_log_message -I "$script_name writing output file: $out_filename"

# move the output file to the web directory
print_log_message -I "$script_name moving output file to dir: $out_dir"
/bin/mv "$json_out" $out_dir
/bin/mv "$out_file" $out_dir
status_code=$?
if [ $status_code -ne 0 ]; then
print_log_message -E "$script_name: mv failed ($status_code) to dir: $out_dir"
Expand Down

0 comments on commit e0d5adf

Please sign in to comment.