Skip to content

feat(backend): add structured logging throughout API#23

Merged
devanprigent merged 1 commit into
devanprigent:mainfrom
JohnMartin0301:feat/add-logging
May 3, 2026
Merged

feat(backend): add structured logging throughout API#23
devanprigent merged 1 commit into
devanprigent:mainfrom
JohnMartin0301:feat/add-logging

Conversation

@JohnMartin0301
Copy link
Copy Markdown
Contributor

Added Python's built-in logging module across all blueprint files to make debugging production issues easier.

Changes made:

  • Configured logging in __init__.py with a consistent format and request timing via before_request/after_request hooks
  • auth.py — logs register, login, refresh, and logout events
  • articles.py — logs create, update, delete, and error cases
  • authors.py— logs create, delete, and conflict cases
  • tags.py — logs create and delete events

Note: The create_app factory was reading DATABASE_URL, SECRET_KEY, and JWT_SECRET_KEY from the environment before applying test_config, which caused all 21 tests to fail with KeyError even before this PR's changes. Fixed this as part of the work to get tests passing — the fix is outside the scope of this issue but was a blocker for verifying the logging changes.

Test results:
Screenshot 2026-05-03 183455

@vercel
Copy link
Copy Markdown

vercel Bot commented May 3, 2026

@JohnMartin0301 is attempting to deploy a commit to the devanprigent's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Owner

@devanprigent devanprigent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great ! The logging integration is clean.

Regarding the note, that was a real issue. Good you fixed it.

I'll merge this

@devanprigent devanprigent merged commit 9536f48 into devanprigent:main May 3, 2026
2 of 3 checks passed
@devanprigent
Copy link
Copy Markdown
Owner

Fixed by @JohnMartin0301 .

Closes #5 .

Thanks for the contribution!

@vercel
Copy link
Copy Markdown

vercel Bot commented May 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
article-manager Ready Ready Preview, Comment May 3, 2026 11:54am

@JohnMartin0301
Copy link
Copy Markdown
Contributor Author

Thank you. Really glad it was helpful. Happy to contribute!

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.

2 participants