import { ColorSupportLevel } from 'supports-color';
export type Method = (format: any, ...param: any[]) => void;
export type Formatter = (value: any, exporter: Exporter, logger: Logger) => any;
export type Type = 'success' | 'error' | 'info' | 'warn' | 'debug';
export interface Message {
    sn: number;
    ts: number;
    name: string;
    type: Type;
    level: Level;
    body: string;
}
export interface Logger extends Record<Type, Method> {
}
export declare const enum Level {
    SILENT = 0,
    SUCCESS = 1,
    ERROR = 1,
    INFO = 2,
    WARN = 2,
    DEBUG = 3
}
export declare namespace Logger {
    interface Options {
        name: string;
        meta?: Partial<Message>;
        level?: Level;
    }
}
export interface Logger extends Logger.Options {
}
export declare class Logger {
    private factory;
    static color(exporter: Exporter, code: number, value: any, decoration?: string): string;
    static code(name: string, level?: false | ColorSupportLevel): number;
    constructor(options: Logger.Options, factory: Factory);
    private _method;
    private _format;
}
export declare class Factory {
    static formatters: Record<string, Formatter>;
    _snMessage: number;
    _snExporter: number;
    exporters: Map<number, Exporter>;
    formatters: any;
    createLogger(name: string, options?: Omit<Logger.Options, 'name'>): Logger;
    addExporter(exporter: Exporter): () => boolean;
}
export interface Exporter extends Exporter.Options {
    export(message: Message): void;
}
export declare namespace Exporter {
    interface Options {
        colors?: false | ColorSupportLevel;
        maxLength?: number;
        levels?: Record<string, number>;
    }
    interface Console extends Console.Options {
    }
    class Console implements Exporter {
        constructor(options?: Console.Options);
        export(message: Message): void;
        render(message: Message): string;
    }
    namespace Console {
        interface Options extends Exporter.Options {
            showDiff?: boolean;
            showTime?: string;
            label?: LabelStyle;
            timestamp?: number;
        }
        interface LabelStyle {
            width?: number;
            margin?: number;
            align?: 'left' | 'right';
        }
    }
}
