feat(logger): Handle plain-text insufficient information
Return without logging if message, level and/or status is not supplied.
This commit is contained in:
@@ -14,8 +14,8 @@ uppercase() {
|
||||
|
||||
# modified syslog fmt: <ISO-8601 timestamp> <hostname> <tag>[pid]: [LEVEL:$2] [STATUS:$3] <MESSAGE:$1> (<OPERATION:$4>:<CODE:$5>)
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user