Files
logger/logger.d.ts
Chris Daßler a7bb65de4f Fix TypeScript type declarations and bump version to 1.0.1-beta.4
- Remove nested declare module wrapper from logger.d.ts to fix double-nesting issue
- Add types field to package.json
- Update version to 1.0.1-beta.4
- Update IOR identifier to com.metatrom.universal-components.logger@1.0.1-beta.4

This fixes TypeScript import errors where the Rollup IOR plugin was wrapping
already-wrapped types, causing a nested module structure that prevented proper imports.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-30 21:31:32 +01:00

37 lines
1.1 KiB
TypeScript

export enum LogLevel {
TRACE = 0,
DEBUG = 1,
INFO = 2,
WARN = 3,
ERROR = 4,
FATAL = 5,
}
export interface ILoggerComponent {
init(): Promise<void>;
setLevel(level: LogLevel): void;
trace(message: string, ...args: unknown[]): void;
debug(message: string, ...args: unknown[]): void;
info(message: string, ...args: unknown[]): void;
warn(message: string, ...args: unknown[]): void;
error(message: string, ...args: unknown[]): void;
fatal(message: string, ...args: unknown[]): void;
child(context: string): ILoggerComponent;
}
export class LoggerComponent implements ILoggerComponent {
constructor(context?: string);
init(): Promise<void>;
setLevel(level: LogLevel): void;
trace(message: string, ...args: unknown[]): void;
debug(message: string, ...args: unknown[]): void;
info(message: string, ...args: unknown[]): void;
warn(message: string, ...args: unknown[]): void;
error(message: string, ...args: unknown[]): void;
fatal(message: string, ...args: unknown[]): void;
child(context: string): ILoggerComponent;
}
export function getLogger(context?: string): ILoggerComponent;
export const logger: LoggerComponent;