extract console error to util func (#11675)

This commit is contained in:
Abhi
2025-10-22 16:09:10 -04:00
committed by GitHub
parent a7faa2080f
commit b40f67b76a
9 changed files with 19 additions and 63 deletions

View File

@@ -10,6 +10,7 @@ import { homedir } from 'node:os';
import type { MCPServerConfig } from '@google/gemini-cli-core';
import {
debugLogger,
GEMINI_DIR,
getErrorMessage,
type TelemetrySettings,
@@ -97,10 +98,10 @@ export function loadSettings(workspaceDir: string): Settings {
}
if (settingsErrors.length > 0) {
console.error('Errors loading settings:');
debugLogger.error('Errors loading settings:');
for (const error of settingsErrors) {
console.error(` Path: ${error.path}`);
console.error(` Message: ${error.message}`);
debugLogger.error(` Path: ${error.path}`);
debugLogger.error(` Message: ${error.message}`);
}
}