fix: route clip_manager logging through module logger#154
Merged
nikopueringer merged 1 commit intonikopueringer:mainfrom Mar 14, 2026
Merged
fix: route clip_manager logging through module logger#154nikopueringer merged 1 commit intonikopueringer:mainfrom
nikopueringer merged 1 commit intonikopueringer:mainfrom
Conversation
Two categories of print/logging fixes in clip_manager.py: 1. ClipEntry.find_assets() used logging.warning() (root logger) instead of the module-level logger = logging.getLogger(__name__) at line 26. Fixed at two call sites (empty AlphaHint dir, no valid media files). 2. scan_clips() used raw print() for its INVALID OR SKIPPED CLIPS summary and the all-valid confirmation. These bypass the logging system entirely — invisible to log level filtering and log handlers when clip_manager is used as a library. Replaced with logger.warning() per entry and logger.info() for the all-valid case. No logic changes. 221 tests pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Two logging consistency fixes in
clip_manager.py, both surgical — no logic changes.1.
ClipEntry.find_assets()—logging.warning()→logger.warning()The module defines
logger = logging.getLogger(__name__)at line 26, but two call sites infind_assets()bypass it, writing directly to the root logger vialogging.warning():These now use the module logger, so they respect the caller's log configuration and show the correct module name (
clip_manager) in log output.2.
scan_clips()—print()→loggerThe INVALID OR SKIPPED CLIPS summary and the all-valid confirmation used raw
print(), which:clip_manageris used as a libraryReplaced with
logger.warning()per invalid entry andlogger.info()for the all-valid case.Why it was needed
When
clip_manageris imported and called programmatically (e.g. fromcorridorkey_cli.py),print()output goes directly to stdout and cannot be filtered or redirected by the caller's logging setup. Thelogging.warning()calls had the same issue — they wrote to the root logger, not the module logger, making them harder to trace and impossible to suppress per-module.How to verify
No behaviour change in interactive use — log output appears identically at WARNING/INFO level when the root handler is configured (as
corridorkey_cli.pydoes via_configure_environment()).