fix(cli): avoid debug logging by default in CLI#7569
Conversation
Signed-off-by: WhiskerSage <[email protected]>
* main: (46 commits) chore(deps): bump minimatch from 10.1.1 to 10.2.3 in /evals/open-model-gym/suite (#7498) chore(deps): bump swiper from 11.2.10 to 12.1.2 in /documentation (#7368) Better network failure error & antrhopic retry (#7595) feat: make the text bar persistent and add a queue for messages (#7560) fix: outdated clippy command in goosehints (#7590) chore(deps): bump hono from 4.11.7 to 4.12.1 in /evals/open-model-gym/mcp-harness (#7417) chore(deps-dev): bump ajv from 6.12.6 to 6.14.0 in /ui/desktop (#7437) chore(deps): bump ajv from 8.17.1 to 8.18.0 in /evals/open-model-gym/mcp-harness (#7491) chore(deps): bump hono from 4.12.0 to 4.12.2 in /ui/desktop (#7515) chore(deps-dev): bump rollup from 4.57.1 to 4.59.0 in /ui/desktop (#7522) chore(deps): bump minimatch in /ui/desktop (#7572) fix: validate configure probe for streaming providers (#7564) Dockerfile: add missing build/runtime dependencies (#7546) fix(claude-code): Permission routing for smart-approve (#7501) Add base_path field to custom provider config (#7558) fix(cli): avoid debug logging by default in CLI (#7569) fix: panic on corrupted permission.yaml instead of silently allowing all (#7432) (#7458) fix(openai): handle null reasoning effort in Responses API (#7469) Allow GOOSE_NODE_DIR override in batch file (#7422) feat: add analyze platform extension with tree-sitter AST parsing (#7542) ...
Signed-off-by: WhiskerSage <[email protected]>
|
Not sure why, but using the goose-x86_64-pc-windows-msvc (v11.27.1) agent still repeatedly writes out debug info during operation?
|
…t to info The dispatch_tool_call #[instrument] macro was not skipping the session parameter, causing the entire Session struct (including full message history and base64 image data) to be serialised into every DEBUG log line. This produced log lines up to 8 MB each, with server logs growing 1-4 GB/day for heavy users. Changes: - Add session to the skip list in dispatch_tool_call's #[instrument], log just session.id instead - Change server default log level from goose=debug to goose=info, matching the CLI fix in block#7569 Users can still enable debug logging via RUST_LOG=goose=debug. Fixes block#4965 (complements the rotation fix in block#5561)
PR Title
fix(cli): avoid debug logging in default CLI filter
PR Body
Summary
Fixes a CLI privacy footgun where default logging included debug-level directives when
RUST_LOGwas not set.Problem
In
crates/goose-cli/src/logging.rs, the fallbackEnvFilterused:mcp_client=debuggoose=debugThis made CLI logs much more verbose by default and increased risk of sensitive content ending up in log files.
Changes
default_env_filter()helper to centralize fallback directives.mcp_client=infogoose=infogoose_cli=infoWARNfor other modulesRUST_LOGis explicitly provided.test_default_filter_avoids_debug_by_defaultgoose=debugormcp_client=debugValidation
Ran:
cargo test -p goose-cli --lib logging::tests::test_default_filter_avoids_debug_by_default -- --exactResult:
1 passed, 0 failedRisk
Low:
RUST_LOG.Fixes #7557