@vepler/logger
Version:
A lightweight, type-safe logging wrapper around Pino, built by Vepler for modern TypeScript applications.
27 lines (26 loc) • 1.03 kB
TypeScript
import type { Logger, LoggerOptions, Bindings } from 'pino';
interface LogContext {
[]: unknown;
}
declare class PinoWrapper {
private static instance;
private logger;
private context;
private constructor();
static initialize(options?: LoggerOptions): void;
private static ensureInitialized;
static setContext(context: LogContext): void;
static clearContext(): void;
private static mergeContext;
static info(message: string, context?: LogContext): void;
private static formatError;
static error(err: unknown, message: string, context?: LogContext): void;
static debug(message: string, context?: LogContext): void;
static warn(message: string, context?: LogContext): void;
static fatal(err: unknown, message: string, context?: LogContext): void;
static trace(message: string, context?: LogContext): void;
static child(bindings: Bindings): PinoWrapper;
static getRawLogger(): Logger;
static flush(): Promise<void>;
}
export default PinoWrapper;