first refactor

This commit is contained in:
Boki 2026-10-20 12:39:38 -04:00
parent 1f5dac28c7
commit 588f666943
84 changed files with 996 additions and 1062 deletions

View file

@ -8,4 +8,4 @@
export { Logger, getLogger, shutdownLoggers, setLoggerConfig } from './logger';
// Type definitions
export type { LogLevel, LogContext, LogMetadata, LoggerConfig } from './types';
export type { LogLevel, LogContext, LogMetadata, LoggerConfig, LoggerLike } from './types';

View file

@ -1,10 +1,15 @@
/**
* Simplified type definitions for the logger library
*/
import type { Logger } from './logger';
// Standard log levels (simplified to pino defaults)
export type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal';
/** Logging capability accepted by adapters, including console-compatible loggers. */
export type LoggerLike = Pick<Logger, Exclude<LogLevel, 'fatal'>> &
Partial<Pick<Logger, 'child' | 'fatal'>>;
// Context that persists across log calls
export interface LogContext {
[key: string]: any;