From e8d9f7c8cd6fb17bf70fd141df08b4b4d735a2af Mon Sep 17 00:00:00 2001 From: MrMeeb Date: Sun, 28 May 2023 10:05:35 +0000 Subject: [PATCH] add LOG_LEVEL env var --- Dockerfile | 1 + README.md | 1 + root/container-init.sh | 1 + root/etc/s6-overlay/s6-rc.d/cronicle/run | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 36d5eb8..b040120 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,7 @@ ENV MODE=manager ENV PUID=1000 ENV PGID=1000 ENV TZ=UTC +ENV LOG_LEVEL=9 #Get required packages RUN apk update && apk add tzdata curl shadow bash xz git procps nodejs npm nano diff --git a/README.md b/README.md index 8ca0330..995a861 100644 --- a/README.md +++ b/README.md @@ -87,3 +87,4 @@ This container automatically checks for scripts in `/config/init` and runs them |PUID |int |1000 |Sets the UID of the user Cronicle runs under |PGID |int |1000 |Sets the GID of the user Cronicle runs under |TZ |[List of valid TZs](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) |UTC |Sets the timezone of the container and by extension Cronicle +|LOG_LEVEL|1-10 |9 |Sets log level from `1` (quietest) to `10` (loudest)| diff --git a/root/container-init.sh b/root/container-init.sh index 394615d..ce9909a 100644 --- a/root/container-init.sh +++ b/root/container-init.sh @@ -21,6 +21,7 @@ PUID=${PUID} PGID=${PGID} TZ=${TZ} MODE=${MODE} +LOG_LEVEL=${LOG_LEVEL} ---------------------------------------------------------------------- " diff --git a/root/etc/s6-overlay/s6-rc.d/cronicle/run b/root/etc/s6-overlay/s6-rc.d/cronicle/run index ffe517e..d3b843c 100644 --- a/root/etc/s6-overlay/s6-rc.d/cronicle/run +++ b/root/etc/s6-overlay/s6-rc.d/cronicle/run @@ -1,3 +1,3 @@ #!/command/with-contenv bash # shellcheck shell=bash -exec s6-setuidgid cronicle node /app/cronicle/lib/main.js --color 1 \ No newline at end of file +exec s6-setuidgid cronicle node /app/cronicle/lib/main.js --debug_level ${LOG_LEVEL} --color ${CRONICLE_color} \ No newline at end of file