BUG: Inconsistent Logger Usage Across Backend Modules
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
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
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AOSSIE-Org/PictoPy
-
bug possible-duplicate
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
AOSSIE-Org/PictoPy#1553 · 4 comments ·
-
BUG: Compiled .pyc committed under .github/scripts, root .gitignore does not ignore __pycache__ Openbug enhancement possible-duplicate
Difficulty 1/5 Under an hour Newbie friendliness 92/100
AOSSIE-Org/PictoPy#1544 · 5 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AOSSIE-Org/PictoPy#1541 · 6 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
AOSSIE-Org/PictoPy#1535 · 1 comment ·
-
bug enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AOSSIE-Org/PictoPy#1533 · 2 comments ·
All issues in AOSSIE-Org/PictoPy
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100