ptgdp: Remove prefix on log lines
This commit is contained in:
parent
6a3a4f9732
commit
22fb9cebb3
6
ptgdp
6
ptgdp
@ -28,15 +28,13 @@ declare p_search="ytsearch:"
|
||||
# Helper functions
|
||||
log() {
|
||||
[ -z "$1" ] && return 1 # Message body
|
||||
printf "%s: %s\\n" \
|
||||
"$_name" \
|
||||
printf "%s\\n" \
|
||||
"$1"
|
||||
}
|
||||
error() {
|
||||
[ -z "$1" ] && return 1 # Message body
|
||||
# 2: Exit code
|
||||
printf "%s: \\e[31m%s\\e[0m\\n" \
|
||||
"$_name" \
|
||||
printf "\\e[31m%s\\e[0m\\n" \
|
||||
"$1"
|
||||
[ -n "$2" ] && exit "${2:-1}"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user