From f4dc8f44b12cdc7921db96c6e51998bf72b37d8d Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Wed, 22 Jul 2026 22:49:13 -0600 Subject: [PATCH] feat(logger): Handle plain-text insufficient information Return without logging if message, level and/or status is not supplied. --- logger.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/logger.sh b/logger.sh index 9198790..853cf7c 100644 --- a/logger.sh +++ b/logger.sh @@ -14,8 +14,8 @@ uppercase() { # modified syslog fmt: [pid]: [LEVEL:$2] [STATUS:$3] (:) writePlainTextLog() { - # if no message is supplied, there is no purpose in generating a log message! - if [ -z "$1" ]; then + # not enough information to generate a meaningful log message + if [ -z "$1" ] || [ $# -lt 3 ]; then return fi