@yambwa/pretty-logger
Version:
A lightweight, extensible logger with log levels, pretty and JSON output, context support, and pluggable transports for Node.js and TypeScript projects.
14 lines (13 loc) • 459 B
TypeScript
import { LogEntry, Transport } from './types';
/**
* Format a log entry in "pretty" mode (human-friendly, colored for development)
*/
export declare function formatPretty(entry: LogEntry): string;
/**
* Format a log entry in "json" mode (structured for production/log collectors)
*/
export declare function formatJSON(entry: LogEntry): string;
/**
* Default console transport - logs to stdout
*/
export declare const defaultConsoleTransport: Transport;