diff --git a/src/lib/common.sh b/src/lib/common.sh index 9111fc2..de53660 100644 --- a/src/lib/common.sh +++ b/src/lib/common.sh @@ -26,9 +26,6 @@ log() { local message local print - local log_file - - log_file="$__log_file" # Read message from STDIN if args not passed. [[ ! -t 0 ]] || [[ "$#" == 0 ]] && message="$(cat <&0)" @@ -48,7 +45,7 @@ log() { while read -r line; do if [[ "$line" ]]; then - printf '[%s] [%s] %s\n' "$(date +"$log_date_fmt")" "$0" "$line" >> "$log_file" + printf '[%s] %s\n' "$(date +"$log_date_fmt")" "$line" >> "$__log_file" fi done <<< "$(sed -r 's/\x1B\[(([0-9]+)(;[0-9]+)*)?[m,K,H,f,J]//g' <<< "$message")" }