Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/keyring-backend-tracing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@googleworkspace/cli": patch
---

Route the "Using keyring backend" log line through `tracing::info!` instead of raw `eprintln!`. The line now respects `GOOGLE_WORKSPACE_CLI_LOG` (so users can suppress it via `gws=warn` as the help text already advertises) and reaches the JSON log pipeline configured by `GOOGLE_WORKSPACE_CLI_LOG_FILE`.
4 changes: 2 additions & 2 deletions crates/google-workspace-cli/src/credential_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ fn get_or_create_key() -> anyhow::Result<[u8; 32]> {
#[cfg(test)]
let backend = KeyringBackend::File; // Force file to avoid native keychain prompts during test execution

// Item 5: log which backend was selected
eprintln!("Using keyring backend: {}", backend.as_str());
// Item 5: log which backend was selected (audit trail; controlled by GOOGLE_WORKSPACE_CLI_LOG)
tracing::info!(backend = backend.as_str(), "Using keyring backend");

let username = std::env::var("USER")
.or_else(|_| std::env::var("USERNAME"))
Expand Down
Loading