From 73e0cb63bccb02433c902adf5643dee0f552697b Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Sat, 22 Apr 2023 20:42:14 +0800 Subject: [PATCH] Fix telemetry.sh passing in null as log level value (#14303) (#14763) --- dockers/docker-sonic-telemetry/telemetry.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/docker-sonic-telemetry/telemetry.sh b/dockers/docker-sonic-telemetry/telemetry.sh index 1f92657e3b..8f116134df 100755 --- a/dockers/docker-sonic-telemetry/telemetry.sh +++ b/dockers/docker-sonic-telemetry/telemetry.sh @@ -63,7 +63,7 @@ if [ -z $CLIENT_AUTH ] || [ $CLIENT_AUTH == "false" ]; then fi LOG_LEVEL=$(echo $GNMI | jq -r '.log_level') -if [ ! -z $LOG_LEVEL ]; then +if [[ $LOG_LEVEL =~ ^[0-9]+$ ]]; then TELEMETRY_ARGS+=" -v=$LOG_LEVEL" else TELEMETRY_ARGS+=" -v=2"