import FastSafeStringify from 'fast-safe-stringify'; import stripAnsi = require('strip-ansi'); export declare namespace N9Log { type Level = 'silent' | 'error' | 'warn' | 'info' | 'debug' | 'trace'; type OptionsParamsForFilter = Omit; interface FilterParameter { message: string; context: object; options: OptionsParamsForFilter; } type Filter = (filterParameter: FilterParameter) => { message?: string; context?: object; }; interface Options { level?: Level; formatJSON?: boolean; filters?: Filter[]; } } export declare const safeStringify: typeof FastSafeStringify; export declare const removeColors: typeof stripAnsi; export declare class N9Log { private static readonly customChalk; private static readonly colorByLevel; stream: { write: (message: string) => void; }; readonly name: string; readonly level: N9Log.Level; private readonly options; private isLevelEnabledCache; private profilers; readonly maxDeep: number; constructor(name: string, options?: N9Log.Options, parentLogger?: N9Log); get formatJSON(): boolean; module(name: string, options?: N9Log.Options): N9Log; isLevelEnabled(level: N9Log.Level): boolean; /** * Tracks the time inbetween subsequent calls to this method with the same * `id` parameter. The second call to this method will log the difference in * milliseconds along with the message. * * @param id Unique id of the profiler * @param message Message to print at the end * @param meta Context to add to the log */ profile(id: string, message?: string, meta?: object): void; error(message: string, context?: object): void; warn(message: string, context?: object): void; info(message: string, context?: object): void; debug(message: string, context?: object): void; trace(message: string, context?: object): void; addFilter(filter: N9Log.Filter): void; private initLogger; private initIsLevelEnabledCache; private print; private getStreamOutputFromLevel; private getOutputLine; private jsonify; } declare const _default: (name: string, options?: N9Log.Options) => N9Log; export default _default;