refactor(logging): Centralize console logging with debugLogger (#11590)

This commit is contained in:
Abhi
2025-10-21 16:35:22 -04:00
committed by GitHub
parent f5e07d94bd
commit b364f37655
72 changed files with 345 additions and 289 deletions
+4 -3
View File
@@ -42,6 +42,7 @@ import {
AuthType,
clearCachedCredentialFile,
ShellExecutionService,
debugLogger,
} from '@google/gemini-cli-core';
import { validateAuthMethod } from '../config/auth.js';
import { loadHierarchicalGeminiMemory } from '../config/config.js';
@@ -389,7 +390,7 @@ export const AppContainer = (props: AppContainerProps) => {
config.isBrowserLaunchSuppressed()
) {
await runExitCleanup();
console.log(`
debugLogger.log(`
----------------------------------------------------------------
Logging in with Google... Please restart Gemini CLI to continue.
----------------------------------------------------------------
@@ -558,7 +559,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
Date.now(),
);
if (config.getDebugMode()) {
console.log(
debugLogger.log(
`[DEBUG] Refreshed memory content in config: ${memoryContent.substring(
0,
200,
@@ -933,7 +934,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
(key: Key) => {
// Debug log keystrokes if enabled
if (settings.merged.general?.debugKeystrokeLogging) {
console.log('[DEBUG] Keystroke:', JSON.stringify(key));
debugLogger.log('[DEBUG] Keystroke:', JSON.stringify(key));
}
if (keyMatchers[Command.QUIT](key)) {