> Discover all available pages from the documentation index: https://mastra.zisheng.pro/zh-TW/llms.txt # Mastra.listLogsByRunId() `.listLogsByRunId()` 方法用於取得指定 run ID 和 transport ID 的記錄。此方法要求設定支援 `listLogsByRunId` 操作的 Logger。 ## 使用範例 ```typescript mastra.listLogsByRunId({ runId: '123', transportId: '456' }) ``` ## 參數 **runId** (`string`): 要取得其記錄的 run ID。 **transportId** (`string`): 要從中取得記錄的 transport ID。 **fromDate** (`Date`): 用於篩選記錄的選用起始日期。 例如 new Date('2024-01-01'). **toDate** (`Date`): 用於篩選記錄的選用結束日期。 例如 new Date('2024-01-31'). **logLevel** (`LogLevel`): 用於篩選的選用記錄層級。 **filters** (`Record`): 套用於記錄查詢的選用附加篩選條件。 **page** (`number`): 用於分頁的選用頁碼。 **perPage** (`number`): 分頁時每頁記錄數量的選用值。 ## 傳回值 **logs** (`Promise`): 解析為指定 run ID 和 transport ID 記錄的 Promise。 ## 相關內容 - [記錄概覽](https://mastra.zisheng.pro/zh-TW/docs/observability/logging) - [Logger 參考](https://mastra.zisheng.pro/zh-TW/reference/logging/pino-logger)