@visulima/pail
Version:
Highly configurable Logger for Node.js, Edge and Browser.
31 lines (27 loc) • 1.99 kB
text/typescript
import { f as ServerConstructorOptions, I as InteractiveManager, R as Reporter, a as DefaultLogTypes, b as LoggerFunction, C as ConstructorOptions } from './packem_shared/types-BGWAKixQ.mjs';
export { D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, S as StreamAwareReporter } from './packem_shared/types-BGWAKixQ.mjs';
import { a as PailBrowserImpl } from './packem_shared/pail.browser-CFOAjmHW.mjs';
import '@visulima/colorize';
import 'safe-stable-stringify';
declare class PailServerImpl<T extends string = string, L extends string = string> extends PailBrowserImpl<T, L> {
readonly options: ServerConstructorOptions<T, L>;
protected readonly stdout: NodeJS.WriteStream;
protected readonly stderr: NodeJS.WriteStream;
protected interactiveManager: InteractiveManager | undefined;
protected readonly interactive: boolean;
constructor(options: ServerConstructorOptions<T, L>);
scope<N extends string = T>(...name: string[]): PailServerType<N, L>;
getInteractiveManager(): InteractiveManager | undefined;
wrapStd(): void;
restoreStd(): void;
wrapAll(): void;
restoreAll(): void;
clear(): void;
protected extendReporter(reporter: Reporter<L>): Reporter<L>;
private _wrapStream;
private _restoreStream;
}
type PailServerType<T extends string = string, L extends string = string> = PailServerImpl<T, L> & Record<DefaultLogTypes, LoggerFunction> & Record<T, LoggerFunction> & (new <TC extends string = string, LC extends string = string>(options?: ServerConstructorOptions<TC, LC>) => PailServerType<TC, LC>);
declare const createPail: <T extends string = string, L extends string = string>(options?: ConstructorOptions<T, L>) => PailServerType<T, L>;
declare const pail: PailServerType<string, string>;
export { ConstructorOptions, DefaultLogTypes, LoggerFunction, type PailServerType as Pail, Reporter, createPail, pail };