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
@@ -7,6 +7,7 @@
import type { CommandModule } from 'yargs';
import { uninstallExtension } from '../../config/extension.js';
import { getErrorMessage } from '../../utils/errors.js';
import { debugLogger } from '@google/gemini-cli-core';
interface UninstallArgs {
name: string; // can be extension name or source URL.
@@ -15,9 +16,9 @@ interface UninstallArgs {
export async function handleUninstall(args: UninstallArgs) {
try {
await uninstallExtension(args.name, false);
console.log(`Extension "${args.name}" successfully uninstalled.`);
debugLogger.log(`Extension "${args.name}" successfully uninstalled.`);
} catch (error) {
console.error(getErrorMessage(error));
debugLogger.error(getErrorMessage(error));
process.exit(1);
}
}