mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-25 12:34:38 -07:00
refactor(logging): Centralize console logging with debugLogger (#11590)
This commit is contained in:
@@ -27,6 +27,7 @@ import {
|
||||
isFunctionCall,
|
||||
isFunctionResponse,
|
||||
} from '../../utils/messageInspectors.js';
|
||||
import { debugLogger } from '../../utils/debugLogger.js';
|
||||
|
||||
const CLASSIFIER_GENERATION_CONFIG: GenerateContentConfig = {
|
||||
temperature: 0,
|
||||
@@ -153,7 +154,7 @@ export class ClassifierStrategy implements RoutingStrategy {
|
||||
promptId = `classifier-router-fallback-${Date.now()}-${Math.random()
|
||||
.toString(16)
|
||||
.slice(2)}`;
|
||||
console.warn(
|
||||
debugLogger.warn(
|
||||
`Could not find promptId in context. This is unexpected. Using a fallback ID: ${promptId}`,
|
||||
);
|
||||
}
|
||||
@@ -206,7 +207,7 @@ export class ClassifierStrategy implements RoutingStrategy {
|
||||
} catch (error) {
|
||||
// If the classifier fails for any reason (API error, parsing error, etc.),
|
||||
// we log it and return null to allow the composite strategy to proceed.
|
||||
console.warn(`[Routing] ClassifierStrategy failed:`, error);
|
||||
debugLogger.warn(`[Routing] ClassifierStrategy failed:`, error);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user