feat(logger): Add test with operation, error code

This commit is contained in:
2026-07-22 23:42:52 -06:00
parent 4a6c339a07
commit f085838781
+1 -1
View File
@@ -131,7 +131,7 @@ if [ "$1" = "text" ]; then
writePlainTextLog "Plain-text message forced to info level" "whoops" "ok" # level translated to default writePlainTextLog "Plain-text message forced to info level" "whoops" "ok" # level translated to default
writePlainTextLog "Warning! This is plain-text." "warning" "flagged" # warning level with 'flagged' status writePlainTextLog "Warning! This is plain-text." "warning" "flagged" # warning level with 'flagged' status
writePlainTextLog "Error sample! This is plain-text." "err" "error" # error level message writePlainTextLog "Error sample! This is plain-text." "err" "error" # error level message
writePlainTextLog "Unable to continue, critical failure. (This is plain-text)" "fatal" "error" # critical level error writePlainTextLog "Unable to continue, critical failure. (This is plain-text)" "fatal" "exit" "startup" "2" # critical level error with operation and error code
elif [ "$1" = "json" ]; then elif [ "$1" = "json" ]; then
writeJsonLog # this will generate a generic error message writeJsonLog # this will generate a generic error message
writeJsonLog "This is a test message" # generate this message at the default level with the default code writeJsonLog "This is a test message" # generate this message at the default level with the default code