From 921f039715362bdb16c9f6ad4ed161a8a7fb7a57 Mon Sep 17 00:00:00 2001 From: Caleb Ely Date: Thu, 19 Aug 2021 12:33:52 -0400 Subject: [PATCH] Note ENABLE_DISCORD_LOGGING is disabled by default --- Dockerfile | 3 ++- README.md | 2 +- src/app_factory.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 45d6891..73e7f1a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,8 @@ FROM python:3.9-alpine ENV PYTHONPATH=/app \ SYS_VARS_PATH=/app/secrets \ FLASK_APP=wsgi.py \ - TIMES_FAILED_THRESHOLD=10 + TIMES_FAILED_THRESHOLD=10 \ + ENABLE_DISCORD_LOGGING=false # Copy the app files into the container RUN mkdir -p /app diff --git a/README.md b/README.md index 3d3b7cf..4fed5b5 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ - SQLite path (`DB_PATH`) - JSON list of auth keys for all non-GET operations (`AUTH_KEYS`) - Integer number of times supposed rotted links should be checked (`TIMES_FAILED_THRESHOLD`, default: 10) -- Discord linkrot event logging boolean (`ENABLE_DISCORD_LOGGING`) +- Discord linkrot event logging boolean (`ENABLE_DISCORD_LOGGING`, default: `False`) - Discord webhook URL (`DISCORD_WEBHOOK_URL`) ## Development diff --git a/src/app_factory.py b/src/app_factory.py index 80aca99..1f91792 100644 --- a/src/app_factory.py +++ b/src/app_factory.py @@ -30,7 +30,7 @@ def create_app(): app.logger.addHandler(logger.file_handler("error-app.log")) # Enable Discord webhook event logging, falling back to a text log - if sys_vars.get_bool("ENABLE_DISCORD_LOGGING", default=False): + if sys_vars.get_bool("ENABLE_DISCORD_LOGGING"): logger.LINKROT.addHandler(logger.DiscordHandler()) else: logger.LINKROT.addHandler(