Skip to content

Enhance logging messages#93

Merged
javidahmed64592 merged 2 commits into
mainfrom
minor-updates
May 7, 2026
Merged

Enhance logging messages#93
javidahmed64592 merged 2 commits into
mainfrom
minor-updates

Conversation

@javidahmed64592
Copy link
Copy Markdown
Owner

This pull request updates logging messages and refines some code logic in python_template_server/template_server.py to improve clarity and consistency. The main focus is on making log statements more explicit about the enabled or disabled status of features, and minor code cleanups for readability.

Logging improvements:

  • Updated log messages throughout the server setup to use a consistent "ENABLED"/"DISABLED" format for features like request logging, security headers, CORS, and rate limiting. This makes it clearer in logs whether a feature is active or not. [1] [2] [3] [4] [5]
  • Added a log statement when loading configuration files to provide better traceability.
  • Minor tweaks to log message wording for consistency and clarity (e.g., punctuation and phrasing). [1] [2]

Code cleanups:

  • Simplified the 404.html handler by using the walrus operator for more concise code.
  • Refactored router setup to use a local variable for clarity.
  • Updated static files mounting to avoid unnecessary string conversion.

Testing:

  • Removed an unnecessary patch for static_dir_exists in the test fixture, likely because the logic has become simpler or more robust.

@javidahmed64592 javidahmed64592 merged commit c08cd93 into main May 7, 2026
16 checks passed
@javidahmed64592 javidahmed64592 deleted the minor-updates branch May 7, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant