@bonginkan/maria
Version:
MARIA OS v5.9.5 – Self-Evolving Organizational Intelligence OS | Speed Improvement Phase 3: LLM Optimization + Command Refactoring | Performance Measurement + Run Evidence System | Zero ESLint/TypeScript Errors | 人とAIが役割を持ち、学び、進化し続けるための仕事のOS | GraphRAG ×
46 lines (45 loc) • 1.26 kB
TypeScript
/**
* Logging Port (ILogger)
* Logging port definition used by the application layer.
*
* - Does not depend on concrete sinks (console / file / OpenTelemetry, etc.)
* - Existing implementations (e.g. `src/utils/logger.ts`) implement this port
*/
export interface LogFields {
/**
* Arbitrary fields for structured logging.
*
* Example:
* - command: "/code"
* - userId: "123"
* - latencyMs: 123
*/
[key: string]: unknown;
}
export interface ILogger {
/**
* Output verbose debug information.
*/
debug(message: string, fields?: LogFields): void;
/**
* Output informational messages.
*/
info(message: string, fields?: LogFields): void;
/**
* Output warning-level messages.
*/
warn(message: string, fields?: LogFields): void;
/**
* Output error-level messages.
*/
error(message: string, fields?: LogFields): void;
/**
* Create a child logger with additional context.
*
* Many modules use a pino-like signature: `logger.child({ module: "name" })`.
* Logger implementations that cannot support child loggers MAY return `this`.
*/
child?(context?: string | {
module?: string;
} | LogFields): ILogger;
}