chore(logging): enforce usage of setup_logger#1895
Conversation
Greptile SummaryThis PR enforces the project convention of using Confidence Score: 5/5Safe to merge — all migrations are correct and the new test is well-structured with only a minor P2 edge case around commented lines. All findings are P2 or lower. The one flagged issue (test pattern matching inside comment lines) is a theoretical edge case with no current instances in the codebase. All 15 migrated files correctly switch to setup_logger(), and the whitelist accurately captures the 5 legitimate exceptions. dimos/project/test_get_logger.py — minor edge case with commented-out code matching the forbidden pattern Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[test_get_logger.py] --> B[Walk dimos/ tree]
B --> C{Line contains\n'= logging.getLogger'?}
C -- No --> D[Skip]
C -- Yes --> E{In WHITELIST?}
E -- Yes --> D
E -- No --> F[Add to violations]
F --> G{violations empty?}
G -- Yes --> H[Test passes ✓]
G -- No --> I[AssertionError:\nUse setup_logger instead]
Reviews (1): Last reviewed commit: "chore(logging): enforce usage of setup_l..." | Re-trigger Greptile |
Problem
People keep adding
logger.getLoggerinstead ofsetup_logger().Closes DIM-804
Solution
getLogger.Breaking Changes
None
How to Test
Contributor License Agreement