import { type LevelName } from "./levels.js";
import type { LogRecord } from "./logger.js";
import { BaseHandler, type BaseHandlerOptions } from "./base_handler.js";
/** Options for {@linkcode ConsoleHandler}. */
export interface ConsoleHandlerOptions extends BaseHandlerOptions {
    /**
     * Whether to use colors in the output.
     *
     * @default {true}
     */
    useColors?: boolean;
}
/**
 * Default logger that outputs log messages to the console via
 * {@linkcode console.log}.
 *
 * @example Usage
 * ```ts no-assert
 * import { ConsoleHandler } from "@std/log/console-handler";
 *
 * const handler = new ConsoleHandler("INFO");
 * handler.log("Hello, world!"); // Prints "Hello, world!"
 * ```
 */
export declare class ConsoleHandler extends BaseHandler {
    #private;
    /**
     * Constructs a new instance.
     *
     * @param levelName The level name to log messages at.
     * @param options Options for the handler.
     */
    constructor(levelName: LevelName, options?: ConsoleHandlerOptions);
    /**
     * Formats a log record into a string.
     *
     * @example Usage
     * ```ts
     * import { ConsoleHandler } from "@std/log/console-handler";
     * import { LogRecord } from "@std/log/logger";
     * import { LogLevels } from "@std/log/levels";
     * import { assertEquals } from "@std/assert/equals";
     * import { blue } from "@std/fmt/colors";
     *
     * const handler = new ConsoleHandler("INFO");
     * const logRecord = new LogRecord({
     *   msg: "Hello, world!",
     *   args: ["foo", "bar"],
     *   level: LogLevels.INFO,
     *   loggerName: "my-logger",
     * });
     * const result = handler.format(logRecord);
     *
     * assertEquals(result, blue("INFO Hello, world!"));
     * ```
     *
     * @param logRecord The log record to format.
     * @returns The formatted log record.
     */
    format(logRecord: LogRecord): string;
    /**
     * Logs a message to the console.
     *
     * @example Usage
     * ```ts no-assert
     * import { ConsoleHandler } from "@std/log/console-handler";
     *
     * const handler = new ConsoleHandler("INFO");
     * handler.log("Hello, world!"); // Prints "Hello, world!"
     * ```
     *
     * @param msg The message to log.
     */
    log(msg: string): void;
}
//# sourceMappingURL=console_handler.d.ts.map