import type { LogConsumer, LogRecord } from './types';
import { red } from 'chalk';
export declare const LogLevel: {
    readonly INFO: "info";
    readonly WARN: "warn";
    readonly ERROR: "error";
};
export type LogLevels = (typeof LogLevel)[keyof typeof LogLevel];
declare const INFO: unique symbol;
declare const WARN: unique symbol;
declare const ERROR: unique symbol;
export type LogLevelsAccess = typeof INFO | typeof WARN | typeof ERROR;
type Color = typeof red;
type Observable = {
    subscribe(handler: (record: LogRecord) => void): void;
};
declare const Write: unique symbol;
/**
 * Logger has three logging channels: info, warning, and error.
 * There are also many topics that use one of these channels.
 *
 * By default, the logger has three topics named after the logging channels.
 * New topics should always use one of defined channel.
 *
 * Loggers are also pipeable.
 * In this mode, only the channel is passed along.
 * Topics processing from the parent logger are ignored.
 */
export declare class Logger implements LogConsumer {
    [INFO]: {
        (...msgs: string[]): void;
        count: number;
    };
    [WARN]: {
        (...msgs: string[]): void;
        count: number;
    };
    [ERROR]: {
        (...msgs: string[]): void;
        count: number;
    };
    info: {
        (...messages: unknown[]): void;
        count: number;
    };
    warn: {
        (...messages: unknown[]): void;
        count: number;
    };
    error: {
        (...messages: unknown[]): void;
        count: number;
    };
    private options;
    private consumer;
    private filters;
    constructor(options?: {
        quiet?: boolean;
    }, filters?: ((level: LogLevels, message: string) => string)[]);
    setup(options?: {
        quiet?: boolean;
    }): this;
    /**
     * Pipe local log channels to parent log channels.
     * This doesn't pipe topics processing.
     * So if child and parent has the same topic with name 'proc',
     * only local topic will be applied to message.
     * Message will be decorated by local topic and will be passed to parent as raw string.
     *
     * @param {LogConsumer} consumer - parent logger
     * @returns {Logger}
     */
    pipe(consumer: LogConsumer): this;
    subscribe(subject: Observable): void;
    /**
     * Defines new write decorator to one of defined log channeld.
     * Each decorator adds colored prefix to messages and apply preconfigured filters.
     *
     * @param {LogLevels} level
     * @param {string} prefix - any bounded text prefix, which will be colored
     * @param {Color} [color] - prefix color
     * @returns new topic
     */
    topic(level: LogLevels, prefix: string, color?: Color): {
        (...messages: unknown[]): void;
        count: number;
    };
    reset(): this;
    [Write](level: LogLevels, message: string): void;
}
export declare function stats(logger: Logger): {
    info: number;
    warn: number;
    error: number;
};
export {};
