import * as yargs from '../../shared/yargs/index.cjs';
import { LogLevel } from '../common/logger.js';
import { CliContribution } from './cli.js';
import { AsyncSubscription } from '../../shared/@parcel/watcher/index.cjs';
import { Event, Emitter } from '../common/event.js';
import { Disposable, DisposableCollection } from '../common/index.js';
/** Maps logger names to log levels.  */
export interface LogLevels {
    [key: string]: LogLevel;
}
/**
 * Parses command line switches related to log levels, then watches the log
 * levels file (if specified) for changes.  This is the source of truth for
 * what the log level per logger should be.
 */
export declare class LogLevelCliContribution implements CliContribution, Disposable {
    protected _logLevels: LogLevels;
    protected wildcardRegexCache: Map<string, RegExp>;
    protected asyncSubscriptions: AsyncSubscription[];
    protected toDispose: DisposableCollection;
    /**
     * Log level to use for loggers not specified in `logLevels`.
     */
    protected _defaultLogLevel: LogLevel;
    protected _logFile?: string;
    protected logConfigChangedEvent: Emitter<void>;
    get defaultLogLevel(): LogLevel;
    get logLevels(): LogLevels;
    get logFile(): string | undefined;
    constructor();
    configure(conf: yargs.Argv): void;
    setArguments(args: yargs.Arguments): Promise<void>;
    protected watchLogConfigFile(filename: string): Promise<void>;
    dispose(): Promise<void>;
    protected slurpLogConfigFile(filename: string): Promise<void>;
    get onLogConfigChanged(): Event<void>;
    logLevelFor(loggerName: string): LogLevel;
    /**
     * Converts the string to a `LogLevel`. Throws an error if invalid.
     */
    protected readLogLevelString(levelStr: string, errMessagePrefix: string): LogLevel;
    /**
     * Converts a wildcard string into a strict regular expression and caches it.
     * Example: "ai-core*" -> /^ai-core.*$/
     */
    protected getWildcardRegex(pattern: string): RegExp;
}
//# sourceMappingURL=logger-cli-contribution.d.ts.map