mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-07-08 18:06:30 +00:00
[PR #1970] [MERGED] fix: Make --quiet flag work again #2770
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/CCExtractor/ccextractor/pull/1970
Author: @cfsmp3
Created: 1/2/2026
Status: ✅ Merged
Merged: 1/2/2026
Merged by: @cfsmp3
Base:
master← Head:fix/quiet-flag-broken📝 Commits (1)
d31ea87fix: Make --quiet flag work again📊 Changes
4 files changed (+35 additions, -3 deletions)
View changed files
📝
src/ccextractor.c(+3 -0)📝
src/lib_ccx/lib_ccx.h(+1 -0)📝
src/rust/lib_ccxr/src/util/log.rs(+5 -0)📝
src/rust/src/libccxr_exports/mod.rs(+26 -3)📄 Description
Summary
The
--quietflag was broken in version 0.96, causing output to still be printed even when the flag was specified.Root causes:
Inverted mapping in Rust FFI: The C→Rust constant mapping was wrong.
CCX_MESSAGES_QUIET=0, CCX_MESSAGES_STDOUT=1, CCX_MESSAGES_STDERR=2but the Rust code mapped0→Stdout, 1→Stderr, 2→Quiet.Logger initialization timing: The Rust logger was initialized BEFORE command-line arguments were parsed, so
--quiethad no effect on the logger's target.Changes:
OutputTargetmapping inccxr_init_basic_logger()set_target()method toCCExtractorLoggerto allow updating after initializationccxr_update_logger_target()FFI function to update logger after arg parsingccxr_update_logger_target()afterccxr_parse_parameters()in mainTest plan
--quietnow produces no output--quietFixes #1956
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.