diff --git a/functions/compression.sh b/functions/compression.sh index bb33cd2e..9616a2c3 100644 --- a/functions/compression.sh +++ b/functions/compression.sh @@ -66,7 +66,7 @@ validate_for_chd() { log i "Validating .cue associated .bin files" local cue_bin_files=$(grep -o -P "(?<=FILE \").*(?=\".*$)" "$file") log i "Associated bin files read:" - log i $(printf '%s\n' "$cue_bin_files") + log i "$(printf '%s\n' "$cue_bin_files")" if [[ ! -z "$cue_bin_files" ]]; then while IFS= read -r line do diff --git a/functions/logger.sh b/functions/logger.sh index d37dafb6..9c2ea6c3 100755 --- a/functions/logger.sh +++ b/functions/logger.sh @@ -86,11 +86,11 @@ log() { esac # Display the message in the terminal - echo -e "$colored_message" + echo -e "$colored_message" >&2 # Write the log message to the log file if [ ! -f "$logfile" ]; then - echo "$timestamp [WARN] Log file not found in \"$logfile\", creating it" + echo "$timestamp [WARN] Log file not found in \"$logfile\", creating it" >&2 touch "$logfile" fi echo "$log_message" >> "$logfile"