Skip to content

Commit

Permalink
Always enable the linkrot text file logger
Browse files Browse the repository at this point in the history
  • Loading branch information
le717 committed Jun 8, 2024
1 parent 15648d1 commit 0f43bb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ _Released TDB_
- Add readme sections to explain new filtering and embed features
- Ensure the `date_added` field is expressed in UTC
- Fix error when linkrot checking with an ID that does not exist in the webring
- Always enable the linkrot text file logger
- Replace `requests` with `python-httpx`
- Update OpenAPI spec version
- Update minimum Python version to 3.11
Expand Down
5 changes: 2 additions & 3 deletions src/app_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ def create_app() -> Flask:
if sys_vars.get("FLASK_ENV") == "production":
app.config["OPENAPI_URL_PREFIX"] = None

# Enable Discord webhook event logging, falling back to a text log
# Set up a file logger, additionally enabling the Discord webhook event logging if requested
logger.logger.addHandler(logger.file_handler("error-linkrot.log", linkrot=True))
if sys_vars.get_bool("ENABLE_DISCORD_LOGGING"):
logger.logger.addHandler(logger.DiscordHandler())
else:
logger.logger.addHandler(logger.file_handler("error-linkrot.log", linkrot=True))

# Register the API endpoints
api = Api(app)
Expand Down

0 comments on commit 0f43bb9

Please sign in to comment.