BUG: Inconsistent Logger Usage Across Backend Modules

Open Beginner friendly
#1,515 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start with backend/app/utils/images.py, backend/app/routes/face_clusters.py, and backend/app/routes/models.py. Compare the route files with the sibling route modules that already use app.logging.setup_logging.get_logger. Done means these three modules no longer use logging.getLogger for their module logger and follow the project logger pattern.

Written by the indexing model from the issue text.

Description

bug enhancement possible-duplicate
Is there an existing issue for this?
  • I have searched the existing issues
What happened?

Three modules use Python's stdlib logging.getLogger directly instead of the project's own get_logger from app.logging.setup_logging. This means their log output bypasses the ColorFormatter, component-level prefixes, and environment-level filtering configured in setup_logging.py.

Affected files
File Problem
backend/app/utils/images.py get_logger assigned correctly on line 35, then silently overwritten by logging.getLogger on line 41
backend/app/routes/face_clusters.py Uses logging.getLogger directly; all 7 sibling route files use get_logger
backend/app/routes/models.py Uses logging.getLogger directly; all 7 sibling route files use get_logger
Root Cause

images.py has a duplicate logger definition the second one overwrites the
first:

# Line 35 — correct
logger = get_logger(__name__)
 
# Line 41 — overwrites the above, bypassing all custom setup
logger = logging.getLogger(__name__)

face_clusters.py and models.py simply never adopted the project logger
pattern that every other route module follows.

Record
  • I agree to follow this project's Code of Conduct
Dominant language
Python
Stars
289
Forks
685
Avg merge
4d 6h
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AOSSIE-Org/PictoPy

All issues in AOSSIE-Org/PictoPy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.