allow to adjust the log level globally (redis)

Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
Simon L.
2026-04-17 15:17:16 +02:00
parent 60231f09eb
commit 02eae0f5ed
2 changed files with 16 additions and 1 deletions

View File

@@ -1,3 +1,7 @@
#!/bin/bash
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
set -x
fi
redis-cli -a "$REDIS_HOST_PASSWORD" PING || exit 1

View File

@@ -1,5 +1,16 @@
#!/bin/bash
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
set -x
fi
if [ "$AIO_LOG_LEVEL" = "warn" ]; then
REDIS_LOG_LEVEL="warning"
else
REDIS_LOG_LEVEL="$AIO_LOG_LEVEL"
fi
export REDIS_LOG_LEVEL
# Show wiki if vm.overcommit is disabled
if [ "$(sysctl -n vm.overcommit_memory)" != "1" ]; then
echo "Memory overcommit is disabled but necessary for safe operation"
@@ -16,7 +27,7 @@ fi
# Build the redis-server argument list.
REDIS_ARGS=(
--loglevel warning
--loglevel "$REDIS_LOG_LEVEL"
--save "" # Disable RDB persistence (Redis is used as a pure cache/lock store)
--maxmemory-policy allkeys-lru # Evict least-recently-used keys when memory is full
--lazyfree-lazy-eviction yes # Perform evictions in a background thread