diff --git a/apps/swh-counters/entrypoint.sh b/apps/swh-counters/entrypoint.sh index 778bf06c6f829f08422ba1899d64b6a7a4d6c09f..57a570fbb3a1fe56280c7021754cfc1632706d6e 100644 --- a/apps/swh-counters/entrypoint.sh +++ b/apps/swh-counters/entrypoint.sh @@ -17,9 +17,14 @@ case "$1" in exec swh $@ ;; *) + EXTRA_CLI_FLAGS="" + if [ ! -z "${SWH_LOG_CONFIG_JSON}" ]; then + EXTRA_CLI_FLAGS="--log-config-json ${SWH_LOG_CONFIG_JSON}" + fi echo Starting the swh-counters API server exec gunicorn --bind 0.0.0.0:${PORT} \ --log-level ${SWH_LOG_LEVEL:-INFO} \ + ${EXTRA_CLI_FLAGS} \ --threads ${THREADS} \ --workers ${WORKERS} \ --timeout ${TIMEOUT} \ diff --git a/apps/swh-counters/requirements.txt b/apps/swh-counters/requirements.txt index d49251ac94ad3312bef073e866e2f22b74d78e93..b2ebd29af1cbf93c81925119ae077a5346cce7fd 100644 --- a/apps/swh-counters/requirements.txt +++ b/apps/swh-counters/requirements.txt @@ -1 +1,2 @@ swh.counters +python-json-logger