AAI SDK
    Preparing search index...

    Type Alias Logger

    Logger: Record<LogLevel, LogFn>

    Structured logger interface. Used by tests to suppress output and by consumers to plug in custom logging backends.

    import { agent } from "@alexkroman1/aai";
    import { createRuntime, type Logger } from "@alexkroman1/aai/runtime";
    declare const myBackend: { log(level: string, msg: string, ctx?: object): void };

    const myLogger: Logger = {
    info: (msg, ctx) => myBackend.log("info", msg, ctx),
    warn: (msg, ctx) => myBackend.log("warn", msg, ctx),
    error: (msg, ctx) => myBackend.log("error", msg, ctx),
    debug: (msg, ctx) => myBackend.log("debug", msg, ctx),
    };
    createRuntime({ agent: agent({ name: "My Agent" }), env: {}, logger: myLogger });