import { NetlifyInfo } from './platform/netlify';
export interface LogEvent {
    level: string;
    message: string;
    fields: {};
    _time: string;
    request?: RequestReport;
    platform?: PlatformInfo;
    vercel?: PlatformInfo;
    netlify?: NetlifyInfo;
}
export declare enum LogLevel {
    debug = 0,
    info = 1,
    warn = 2,
    error = 3,
    off = 100
}
export interface RequestReport {
    startTime: number;
    statusCode?: number;
    ip?: string;
    region?: string;
    path: string;
    host: string;
    method: string;
    scheme: string;
    userAgent?: string | null;
}
export interface PlatformInfo {
    environment?: string;
    region?: string;
    route?: string;
    source?: string;
}
export declare class Logger {
    private args;
    private req;
    private autoFlush;
    source: 'frontend' | 'lambda' | 'edge';
    logEvents: LogEvent[];
    throttledSendLogs: (this: any) => void;
    children: Logger[];
    logLevel: string;
    constructor(args?: {
        [key: string]: any;
    }, req?: RequestReport | null, autoFlush?: Boolean, source?: 'frontend' | 'lambda' | 'edge', logLevel?: string);
    debug: (message: string, args?: {
        [key: string]: any;
    }) => void;
    info: (message: string, args?: {
        [key: string]: any;
    }) => void;
    warn: (message: string, args?: {
        [key: string]: any;
    }) => void;
    error: (message: string, args?: {
        [key: string]: any;
    }) => void;
    with: (args: {
        [key: string]: any;
    }) => Logger;
    withRequest: (req: RequestReport) => Logger;
    _log: (level: string, message: string, args?: {
        [key: string]: any;
    }) => void;
    attachResponseStatus: (statusCode: number) => void;
    sendLogs(): Promise<void>;
    flush: () => Promise<void>;
}
export declare const log: Logger;
export declare function prettyPrint(ev: LogEvent): void;
