Skip to content

fix(api): use structured placeholders in health logging#385

Open
SaitejaKommi wants to merge 1 commit intoopenfoodfacts:mainfrom
SaitejaKommi:fix/health-logger-format
Open

fix(api): use structured placeholders in health logging#385
SaitejaKommi wants to merge 1 commit intoopenfoodfacts:mainfrom
SaitejaKommi:fix/health-logger-format

Conversation

@SaitejaKommi
Copy link
Copy Markdown

Summary

This PR fixes the health endpoint warning log call to use explicit formatting placeholders.

The change aligns logging with standard Python logging practices and improves log readability.


Related Issue

Fixes #384


What Changed

  • Updated one line in api.py
  • Replaced the warning log call with structured placeholders

Before

logger.warning("HEALTH:", message, status)

After

logger.warning("HEALTH: %s %s", message, status)

Testing

Full local gate executed successfully:

  • Backend unit tests ✅
  • Backend integration tests ✅
  • Frontend build and tests (dev) ✅
  • Frontend build and tests (prod) ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Backlog (ready for dev)

Development

Successfully merging this pull request may close these issues.

Health endpoint logger call should use format placeholders

1 participant