UNPKG

@nanocollective/nanocoder

Version:

A local-first CLI coding agent that brings the power of agentic coding tools like Claude Code and Gemini CLI to local models or controlled APIs like OpenRouter

93 lines 2.92 kB
/** * Main logging interface with facade pattern for backward compatibility * Uses dependency injection pattern to avoid circular dependencies */ import type { Logger, LoggerConfig, LogLevel } from './types.js'; /** * Initialize the logger with configuration */ export declare function initializeLogger(config?: Partial<LoggerConfig>): Logger; /** * Get the current logger instance */ export declare function getLogger(): Logger; /** * Get the current configuration */ export declare function getLoggerConfig(): LoggerConfig | null; /** * Create a child logger with additional context */ export declare function createChildLogger(bindings: Record<string, any>): Logger; /** * Check if a log level is enabled */ export declare function isLevelEnabled(level: LogLevel): boolean; /** * Convenience methods that match console.log API */ export declare const log: { fatal: (msg: string, ...args: any[]) => void; error: (msg: string, ...args: any[]) => void; warn: (msg: string, ...args: any[]) => void; info: (msg: string, ...args: any[]) => void; http: (msg: string, ...args: any[]) => void; debug: (msg: string, ...args: any[]) => void; trace: (msg: string, ...args: any[]) => void; }; /** * Backward compatibility facade - wraps console during transition * This will be gradually replaced with structured logging */ export declare const console: { log: (...args: any[]) => void; error: (...args: any[]) => void; warn: (...args: any[]) => void; info: (...args: any[]) => void; debug: (...args: any[]) => void; }; /** * Flush any pending logs */ export declare function flush(): Promise<void>; /** * End the logger and close all streams */ export declare function end(): Promise<void>; export { /** @internal */ createConfig, /** @internal */ getDefaultLogDirectory, /** @internal */ getEnvironmentConfig, /** @internal */ normalizeLogLevel, /** @internal */ validateLogLevel, } from './config.js'; export { /** @internal */ correlationMiddleware, /** @internal */ createCorrelationFromHeaders, /** @internal */ extractCorrelationId, /** @internal */ formatCorrelationForLog, generateCorrelationId, getCorrelationId, withNewCorrelationContext, } from './correlation.js'; export { calculateMemoryDelta, endMetrics, /** @internal */ formatBytes, formatMemoryUsage, /** @internal */ globalPerformanceMonitor, startMetrics, } from './performance.js'; export type { Logger, LoggerConfig, LogLevel } from './types.js'; export { healthChecks } from './health-monitor/index.js'; export { globalLogStorage } from './log-query/index.js'; export { /** @internal */ aiTracker, globalRequestTracker, /** @internal */ httpTracker, /** @internal */ mcpTracker, } from './request-tracker.js'; export { type HealthCheck, type HealthCheckConfig, type HealthCheckResult, type SystemMetrics, } from './health-monitor/index.js'; //# sourceMappingURL=index.d.ts.map