UNPKG

@mastra/core

Version:
22 lines • 1.03 kB
import type { Logger } from 'chat'; import type { LogLevel } from '../logger/constants.js'; import type { IMastraLogger } from '../logger/logger.js'; export interface ToChatLoggerOptions { /** Lowest level to forward. `silent` forwards nothing. Defaults to `debug`, so the Mastra logger decides. */ minLevel?: LogLevel; /** Written as the `component` field on each record. Defaults to `chat-sdk`. */ component?: string; } /** * Reads the logger on each call, so a Chat instance that already exists follows * `Mastra.setLogger`. * @internal */ export declare function createChatLogger(getLogger: () => IMastraLogger, options?: ToChatLoggerOptions): Logger; /** * Adapts a Mastra logger to the Chat SDK `Logger` interface. Pass the result to * a Chat SDK adapter or to `chatOptions.logger`. `child(prefix)` extends the * `component` field as `component:prefix`. */ export declare function toChatLogger(logger: IMastraLogger, options?: ToChatLoggerOptions): Logger; //# sourceMappingURL=chat-logger.d.ts.map