fix(logger): Fix JSON logger
Level and status were swapped. JSON output was missing new prefix information (timestamp, hostname, etc.)
This commit is contained in:
@@ -88,12 +88,12 @@ writeJsonLog() {
|
||||
--arg hostname "$(getHostname)" \
|
||||
--arg pName "$LOG_PROGRAM_NAME" \
|
||||
--arg pid = "$$" \
|
||||
--arg level "$2" \
|
||||
--arg status "$(standardizeLogLevels "$3")" \
|
||||
--arg level "$(standardizeLogLevels "$2")" \
|
||||
--arg status "$(uppercase "$3")" \
|
||||
--arg message "$1" \
|
||||
--arg operation "${4:UNSPECIFIED}" \
|
||||
--arg code "${5:999}" \
|
||||
'{"level":$level, "programName":$pName, "status":$status, "operation":$operation, "code":$code, "message":$message}' \
|
||||
'{"timestamp":$timestamp, "hostname":$hostname, "programName":$pName, "pid":$pid, "level":$level, "status":$status, "message":$message, "operation":$operation, "code":$code}' \
|
||||
)"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user