feat(logger): Handle plain-text insufficient information

Return without logging if message, level and/or status is not supplied.
This commit is contained in:
2026-07-22 22:49:13 -06:00
parent 3792881529
commit f4dc8f44b1
+2 -2
View File
@@ -14,8 +14,8 @@ uppercase() {
# modified syslog fmt: <ISO-8601 timestamp> <hostname> <tag>[pid]: [LEVEL:$2] [STATUS:$3] <MESSAGE:$1> (<OPERATION:$4>:<CODE:$5>) # modified syslog fmt: <ISO-8601 timestamp> <hostname> <tag>[pid]: [LEVEL:$2] [STATUS:$3] <MESSAGE:$1> (<OPERATION:$4>:<CODE:$5>)
writePlainTextLog() { writePlainTextLog() {
# if no message is supplied, there is no purpose in generating a log message! # not enough information to generate a meaningful log message
if [ -z "$1" ]; then if [ -z "$1" ] || [ $# -lt 3 ]; then
return return
fi fi