Skip to content

Commit 0da9550

Browse files
authored
Do not log from bootstrap script unless DD_LOG_LEVEL is DEBUG (#44)
1 parent 4d77f8f commit 0da9550

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

scripts/boot.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@
22
args=("$@")
33
if [ "$DD_EXPERIMENTAL_ENABLE_PROXY" == "true" ]
44
then
5-
echo "[bootstrap] DD_EXPERIMENTAL_ENABLE_PROXY is true"
6-
echo "[bootstrap] orignal AWS_LAMBDA_RUNTIME_API $AWS_LAMBDA_RUNTIME_API"
5+
if [ grep -ix "$DD_LOG_LEVEL" <<< "debug" ]
6+
then
7+
echo "[bootstrap] DD_EXPERIMENTAL_ENABLE_PROXY is true"
8+
echo "[bootstrap] original AWS_LAMBDA_RUNTIME_API value is $AWS_LAMBDA_RUNTIME_API"
9+
fi
10+
711
export AWS_LAMBDA_RUNTIME_API="127.0.0.1:9000"
8-
echo "[bootstrap] rerouting to $AWS_LAMBDA_RUNTIME_API"
12+
13+
if [ grep -ix "$DD_LOG_LEVEL" <<< "debug" ]
14+
then
15+
echo "[bootstrap] rerouting AWS_LAMBDA_RUNTIME_API to $AWS_LAMBDA_RUNTIME_API"
16+
fi
917
fi
1018
exec "${args[@]}"

0 commit comments

Comments
 (0)