Skip to content

Commit

Permalink
Note ENABLE_DISCORD_LOGGING is disabled by default
Browse files Browse the repository at this point in the history
  • Loading branch information
le717 committed Aug 19, 2021
1 parent e607c0c commit 921f039
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/app_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 921f039

Please sign in to comment.