From 58f22ed34ca7a5c3f4069c8079174d4a07ecb359 Mon Sep 17 00:00:00 2001 From: ElevenNotes Date: Fri, 7 Feb 2025 10:49:24 +0100 Subject: [PATCH] add DEBUG option --- RELEASE.md | 2 +- arch.dockerfile | 1 + rootfs/usr/local/bin/entrypoint.sh | 8 +++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index bd7c324..11f3288 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,2 +1,2 @@ ### 🪄 Features -* remove truncation from clients.html \ No newline at end of file +* add DEBUG option via enivornment variable DEBUG \ No newline at end of file diff --git a/arch.dockerfile b/arch.dockerfile index 7c2737a..94f959b 100644 --- a/arch.dockerfile +++ b/arch.dockerfile @@ -20,6 +20,7 @@ ARG APP_VERSION=stable ENV PYKMS_LICENSE_PATH=/opt/py-kms/LICENSE ENV PYKMS_VERSION_PATH=/opt/py-kms/VERSION ENV PORT=8080 + ENV LOG_LEVEL=INFO # :: multi-stage COPY ./LICENSE /opt/py-kms diff --git a/rootfs/usr/local/bin/entrypoint.sh b/rootfs/usr/local/bin/entrypoint.sh index ea71c20..833ff47 100644 --- a/rootfs/usr/local/bin/entrypoint.sh +++ b/rootfs/usr/local/bin/entrypoint.sh @@ -1,8 +1,14 @@ #!/bin/ash if [ -z "${1}" ]; then + + if [ ! -z "${DEBUG}" ]; then + LOG_LEVEL="DEBUG" + eleven log debug "setting kms-gui log level to DEBUG" + fi + cd /opt/py-kms set -- "gunicorn" \ - --log-level INFO \ + --log-level ${LOG_LEVEL} \ pykms_WebUI:app eleven log start