Interface ILoggerInstance

Interface for logger instances, extending the base ILogger with lifecycle methods. Implemented by LoggerInstance for client-specific logging with initialization and disposal support.

interface ILoggerInstance {
    debug(topic: string, ...args: any[]): void;
    dispose(): void | Promise<void>;
    info(topic: string, ...args: any[]): void;
    log(topic: string, ...args: any[]): void;
    waitForInit(initial: boolean): void | Promise<void>;
}

Hierarchy

  • ILogger
    • ILoggerInstance

Methods

  • Logs a debug-level message. Employed for detailed diagnostic information, such as intermediate states during agent tool calls, swarm navigation changes, or embedding creation processes, typically enabled in development or troubleshooting scenarios.

    Parameters

    • topic: string
    • ...args: any[]

    Returns void

  • Disposes of the logger instance, invoking the onDispose callback if provided. Cleans up resources associated with the client ID.

    Returns void | Promise<void>

  • Logs an info-level message. Used to record informational updates, such as successful completions, policy validations, or history commits, providing a high-level overview of system activity without excessive detail.

    Parameters

    • topic: string
    • ...args: any[]

    Returns void

  • Logs a general-purpose message. Used throughout the swarm system to record significant events or state changes, such as agent execution, session connections, or storage updates.

    Parameters

    • topic: string
    • ...args: any[]

    Returns void

  • Initializes the logger instance, invoking the onInit callback if provided. Ensures initialization is performed only once, supporting asynchronous setup.

    Parameters

    • initial: boolean

    Returns void | Promise<void>