From 14c4ff7809d3a48b1da1f3caa4c03b77924e85ee Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Fri, 17 Apr 2026 15:17:15 +0200 Subject: [PATCH] allow to adjust the log level globally (imaginary) Signed-off-by: Simon L. --- Containers/imaginary/healthcheck.sh | 4 ++++ Containers/imaginary/start.sh | 15 +++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/Containers/imaginary/healthcheck.sh b/Containers/imaginary/healthcheck.sh index 46d700fc..2179239d 100644 --- a/Containers/imaginary/healthcheck.sh +++ b/Containers/imaginary/healthcheck.sh @@ -1,3 +1,7 @@ #!/bin/bash +if [ "$AIO_LOG_LEVEL" = 'debug' ]; then + set -x +fi + nc -z 127.0.0.1 "$PORT" || exit 1 diff --git a/Containers/imaginary/start.sh b/Containers/imaginary/start.sh index 75c50292..4f6a4af7 100644 --- a/Containers/imaginary/start.sh +++ b/Containers/imaginary/start.sh @@ -1,5 +1,20 @@ #!/bin/bash +if [ "$AIO_LOG_LEVEL" = 'debug' ]; then + set -x +fi + +if [ "$AIO_LOG_LEVEL" = 'debug' ]; then + export DEBUG='*' + export GOLANG_LOG='info' +elif [ "$AIO_LOG_LEVEL" = 'info' ]; then + export GOLANG_LOG='info' +elif [ "$AIO_LOG_LEVEL" = 'warn' ]; then + export GOLANG_LOG='warning' +else + export GOLANG_LOG='error' +fi + echo "Imaginary has started" IMAGINARY_ARGS=(-return-size -max-allowed-resolution 222.2)