feat(logger): Add test with operation, error code
This commit is contained in:
@@ -131,7 +131,7 @@ if [ "$1" = "text" ]; then
|
||||
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 "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
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user