universal-ai-brain
Version:
🧠UNIVERSAL AI BRAIN 3.3 - The world's most advanced cognitive architecture with 24 specialized systems, MongoDB 8.1 $rankFusion hybrid search, latest Voyage 3.5 embeddings, and framework-agnostic design. Works with Mastra, Vercel AI, LangChain, OpenAI A
35 lines (28 loc) • 907 B
text/typescript
/**
* @file Logger utility for Universal AI Brain
*
* Simple logging utility that provides consistent logging across the system.
*/
export interface Logger {
info(message: string, ...args: any[]): void;
warn(message: string, ...args: any[]): void;
error(message: string, ...args: any[]): void;
debug(message: string, ...args: any[]): void;
}
class SimpleLogger implements Logger {
info(message: string, ...args: any[]): void {
console.log(`[INFO] ${message}`, ...args);
}
warn(message: string, ...args: any[]): void {
console.warn(`[WARN] ${message}`, ...args);
}
error(message: string, ...args: any[]): void {
console.error(`[ERROR] ${message}`, ...args);
}
debug(message: string, ...args: any[]): void {
if (process.env.NODE_ENV === 'development') {
console.debug(`[DEBUG] ${message}`, ...args);
}
}
}
export const logger = new SimpleLogger();