type StreamBuffer = string | Buffer | Uint8Array; export type LoggerInput = StreamBuffer | (() => StreamBuffer); /** * Log the buffer to the output * @param buffer */ declare function log(buffer: LoggerInput): void; /** * Log the buffer to the error output * @param buffer */ declare function error(buffer: LoggerInput): void; /** * Log the buffer to the error ouput and exist the current process * @param buffer * @param status */ declare function fatal(this: Logger, buffer: LoggerInput, status?: number): never; export interface Logger { error: typeof error; fatal: typeof fatal; log: typeof log; } export type LoggerOptions = { debug: boolean; console: boolean; }; export declare class Logger { constructor({ debug, console }: LoggerOptions); } /** * Set the 'global' logger * @param logger * @returns the global logger */ export declare function setProcessLogger(logger: Readonly): Readonly; /** * Get the 'global' logger */ export declare function getProcessLogger(): Logger; export {};