Skip to content

Fix: standardize logging configuration across backend services#1297

Merged
rohan-pandeyy merged 1 commit into
AOSSIE-Org:mainfrom
rohan-pandeyy:fix/incorrect-uvicorn-logs
May 29, 2026
Merged

Fix: standardize logging configuration across backend services#1297
rohan-pandeyy merged 1 commit into
AOSSIE-Org:mainfrom
rohan-pandeyy:fix/incorrect-uvicorn-logs

Conversation

@rohan-pandeyy
Copy link
Copy Markdown
Contributor

@rohan-pandeyy rohan-pandeyy commented May 29, 2026

Addressed Issues:

Fixes #1172

Improved logging output formatting to more accurately label Uvicorn-related logs, ensuring clearer and more consistent log identification across services.

AI Usage Disclosure:

Check one of the checkboxes below:

  • This PR does not contain AI-generated code at all.
  • This PR contains AI-generated code. I have read the AI Usage Policy and this PR complies with this policy. I have tested the code locally and I am responsible for it.

I have used the following AI models and tools: TODO

Checklist

  • My PR addresses a single issue, fixes a single bug or makes a single improvement.
  • My code follows the project's code style and conventions
  • If applicable, I have made corresponding changes or additions to the documentation
  • If applicable, I have made corresponding changes or additions to tests
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contribution Guidelines
  • Once I submit my PR, CodeRabbit AI will automatically review it and I will address CodeRabbit's comments.
  • I have filled this PR template completely and carefully, and I understand that my PR may be closed without review otherwise.

Summary by CodeRabbit

  • Refactor

    • Updated logging module to normalize Uvicorn log source information in log messages.
  • Documentation

    • Reorganized OpenAPI schema definitions for improved documentation structure.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 2026

Walkthrough

This PR corrects Uvicorn startup logs misleadingly tagged as [error] by normalizing log module names in both the backend and sync-microservice logging handlers to display [uvicorn] when the logger name originates from Uvicorn. It also reorders OpenAPI schema definitions in the documentation.

Changes

Logging and Documentation Updates

Layer / File(s) Summary
Uvicorn Log Normalization
backend/app/logging/setup_logging.py, sync-microservice/app/logging/setup_logging.py
InterceptHandler.emit() detects logger names starting with "uvicorn" and forces the module_name to "uvicorn" before falling back to existing dotted-segment extraction, correcting the misleading [error] tag in Uvicorn startup logs.
OpenAPI Schema Documentation Reordering
docs/backend/backend_python/openapi.json
App-scoped ErrorResponse schema definitions are repositioned within components.schemas; schema field definitions and shapes remain unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

Python, Documentation

Poem

🐰 A hoppy fix for logs so bright,
No more false [error] in the night!
Uvicorn's voice now rings so clear,
With proper tags for all to hear. ✨

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The code changes directly address issue #1172 by normalizing Uvicorn log source module names to 'uvicorn' instead of deriving error-prone tags from logger names.
Out of Scope Changes check ✅ Passed The OpenAPI documentation ordering change appears incidental; all code changes focus on fixing the Uvicorn logging issue across backend and sync-microservice modules.
Title check ✅ Passed The title accurately describes the main change: standardizing logging configuration by fixing Uvicorn log prefixes across backend and sync-microservice components.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added backend bug Something isn't working good first issue Good for newcomers labels May 29, 2026
@rohan-pandeyy rohan-pandeyy changed the title feat: standardize logging configuration across backend services Fix: standardize logging configuration across backend services May 29, 2026
@rohan-pandeyy rohan-pandeyy merged commit bfe55b3 into AOSSIE-Org:main May 29, 2026
8 checks passed
@rohan-pandeyy rohan-pandeyy deleted the fix/incorrect-uvicorn-logs branch May 29, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend bug Something isn't working good first issue Good for newcomers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Uvicorn startup logs confusingly labeled as [error]

1 participant