fix(logger): Fix default subst
Default parameter substitution in all functions was incorrect.
This commit is contained in:
@@ -91,8 +91,8 @@ writeJsonLog() {
|
||||
--arg level "$(standardizeLogLevels "$2")" \
|
||||
--arg status "$(uppercase "$3")" \
|
||||
--arg message "$1" \
|
||||
--arg operation "${4:UNSPECIFIED}" \
|
||||
--arg code "${5:999}" \
|
||||
--arg operation "${4:-UNSPECIFIED}" \
|
||||
--arg code "${5:-999}" \
|
||||
'{"timestamp":$timestamp, "hostname":$hostname, "programName":$pName, "pid":$pid, "level":$level, "status":$status, "message":$message, "operation":$operation, "code":$code}' \
|
||||
)"
|
||||
|
||||
@@ -115,8 +115,8 @@ SYSLOG_PID="$$"
|
||||
PRIORITY="$(translateLogLevelsToJournalD "$2")"
|
||||
STATUS="$(uppercase "$3")"
|
||||
MESSAGE="$1"
|
||||
OPERATION="${4:UNSPECIFIED}"
|
||||
ERRNO="${5:999}"
|
||||
OPERATION="${4:-UNSPECIFIED}"
|
||||
ERRNO="${5:-999}"
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user