refactor(logging): Centralize all console messaging to a shared logger (part 1) (#11537)

This commit is contained in:
Abhi
2025-10-20 18:16:47 -04:00
committed by GitHub
parent d5a06d3cd2
commit 995ae717cc
18 changed files with 145 additions and 143 deletions
@@ -5,6 +5,7 @@
*/
import {
debugLogger,
flatMapTextParts,
readPathFromWorkspace,
} from '@google/gemini-cli-core';
@@ -68,8 +69,9 @@ export class AtFileProcessor implements IPromptProcessor {
error instanceof Error ? error.message : String(error);
const uiMessage = `Failed to inject content for '@{${pathStr}}': ${message}`;
console.error(
`[AtFileProcessor] ${uiMessage}. Leaving placeholder in prompt.`,
// `context.invocation` should always be present at this point.
debugLogger.error(
`Error while loading custom command (${context.invocation!.name}) ${uiMessage}. Leaving placeholder in prompt.`,
);
context.ui.addItem(
{ type: MessageType.ERROR, text: uiMessage },