import { Disposable } from '../../../util/vs/base/common/lifecycle';
export declare const ILogService: import("../../../util/common/services").ServiceIdentifier<ILogService>;
/**
 * Log levels (taken from vscode.d.ts)
 */
export declare enum LogLevel {
    /**
     * No messages are logged with this level.
     */
    Off = 0,
    /**
     * All messages are logged with this level.
     */
    Trace = 1,
    /**
     * Messages with debug and higher log level are logged with this level.
     */
    Debug = 2,
    /**
     * Messages with info and higher log level are logged with this level.
     */
    Info = 3,
    /**
     * Messages with warning and higher log level are logged with this level.
     */
    Warning = 4,
    /**
     * Only error messages are logged with this level.
     */
    Error = 5
}
export interface ILogTarget {
    logIt(level: LogLevel, metadataStr: string, ...extra: any[]): void;
    show?(preserveFocus?: boolean): void;
}
export declare class ConsoleLog implements ILogTarget {
    private readonly prefix?;
    private readonly minLogLevel;
    constructor(prefix?: string | undefined, minLogLevel?: LogLevel);
    logIt(level: LogLevel, metadataStr: string, ...extra: any[]): void;
}
export interface ILogService extends ILogger {
    readonly _serviceBrand: undefined;
}
/**
 * Mirrors vscode's {@link LogOutputChannel} in terms of available logging functions
 * Args has been ommitted for now in favor of simplifying the interface
 */
export interface ILogger {
    trace(message: string): void;
    debug(message: string): void;
    info(message: string): void;
    warn(message: string): void;
    /**
     * Logs an error message. Prefer this method over `error()` when logging exception details.
     *
     * @param error The Error object that was thrown
     * @param message An optional message for context (e.g. "Request error"). Must not contain customer data. **Do not include stack trace or messages from the error object.**
    */
    error(error: string | Error, message?: string): void;
    show(preserveFocus?: boolean): void;
}
export declare class LogServiceImpl extends Disposable implements ILogService {
    _serviceBrand: undefined;
    readonly logger: LoggerImpl;
    constructor(logTargets: ILogTarget[]);
    trace(message: string): void;
    debug(message: string): void;
    info(message: string): void;
    warn(message: string): void;
    error(error: string | Error, message?: string): void;
    show(preserveFocus?: boolean): void;
}
declare class LoggerImpl implements ILogger {
    private readonly _logTargets;
    constructor(_logTargets: ILogTarget[]);
    private _logIt;
    trace(message: string): void;
    debug(message: string): void;
    info(message: string): void;
    warn(message: string): void;
    error(error: string | Error, message?: string): void;
    show(preserveFocus?: boolean): void;
}
export declare function collectErrorMessages(e: any): string;
export declare class LogMemory {
    private static _logs;
    private static _requestIds;
    private static readonly MAX_LOGS;
    /**
     * Extracts the requestId from a log message if it matches the expected pattern.
     * Returns a string in the format 'requestId: {string}' or undefined if not found.
     */
    private static extractRequestIdFromMessage;
    static addLog(level: string, message: string): void;
    static getLogs(): string[];
    static getRequestIds(): string[];
}
export {};
//# sourceMappingURL=logService.d.ts.map