Skip to Content

ログ API

ログ API は、Mastra のシステムログとデバッグ情報にアクセスして照会するためのメソッドを提供します。

Mastraクライアントの初期化

import { MastraClient } from "@mastra/client-js"; const client = new MastraClient();

ログの取得

オプションのフィルタリングを使用してシステムログを取得します:

const logs = await client.getLogs({ transportId: "transport-1", });

特定の実行のログを取得する

特定の実行のログを取得します:

const runLogs = await client.getLogForRun({ runId: "run-1", transportId: "transport-1", });