import { AsError, Logger, WithLogger, LevelHandler, LogFormatter, HttpType } from "./logger.js"; import { BasicSysAbstraction } from "./sys-abstraction.js"; import { Result } from "./result.js"; import { CoerceURI } from "./uri.js"; import { TxtEnDecoder } from "./txt-en-decoder.js"; import { LogWriterStream } from "./log-writer-impl.js"; import { LogSerializable, Level, FnSerialized } from "./types.js"; export declare class JSONFormatter implements LogFormatter { private readonly _txtEnDe; private readonly _space?; constructor(txtEnde: TxtEnDecoder, space?: number); format(attr: LogSerializable): Uint8Array; } export declare class YAMLFormatter implements LogFormatter { private readonly _txtEnDe; private readonly _space?; constructor(txtEnde: TxtEnDecoder, space?: number); format(attr: LogSerializable): Uint8Array; } export interface LoggerImplParams { readonly out?: WritableStream; readonly logWriter?: LogWriterStream; readonly sys?: BasicSysAbstraction; readonly withAttributes?: LogSerializable; readonly levelHandler?: LevelHandler; readonly txtEnDe?: TxtEnDecoder; readonly formatter?: LogFormatter; } export declare class LoggerImpl implements Logger { readonly _sys: BasicSysAbstraction; readonly _attributes: LogSerializable; readonly _withAttributes: LogSerializable; readonly _logWriter: LogWriterStream; readonly levelHandler: LevelHandler; readonly _txtEnDe: TxtEnDecoder; _formatter: LogFormatter; constructor(params?: LoggerImplParams); TimerStart(key: string): Logger; TimerEnd(key: string): Logger; TxtEnDe(): TxtEnDecoder; Attributes(): Record; SetExposeStack(enable?: boolean): Logger; EnableLevel(level: Level, ...modules: string[]): Logger; DisableLevel(level: Level, ...modules: string[]): Logger; Module(key: string): Logger; SetDebug(...modules: (string | string[])[]): Logger; SetIgnoreAttribute(re?: RegExp): Logger; SetFormatter(formatter: LogFormatter): Logger; Timestamp(): Logger; Warn(): Logger; Log(): Logger; Debug(): Logger; Error(): Logger; Info(): Logger; Err(err: T | Result | Error): Logger; WithLevel(l: Level): Logger; Ref(key: string, action: { toString: () => string; } | FnSerialized): Logger; Bool(key: string | Record, value: unknown): Logger; Http(...mix: (HttpType | string)[]): Logger; Pair(x: Record): Logger; Result(key: string, res: Result): Logger; Len(value: unknown, key?: string): Logger; Hash(value: unknown, key?: string): Logger; Url(url: CoerceURI, key?: string): Logger; private coerceKey; Str(key: string | Record, value?: string): Logger; Any(key: string | Record, value?: unknown): Logger; Dur(key: string, nsec: number): Logger; Uint64(key: string | Record, value?: number): Logger; Int(key: string | Record, value?: number): Logger; Flush(): Promise; With(): WithLogger; _resetAttributes(fn: () => () => Uint8Array): () => Uint8Array; Msg(...args: string[]): AsError; } //# sourceMappingURL=logger-impl.d.ts.map