Logs API
Logs API 提供用于访问和查询 Mastra 中系统日志与调试信息的方法。
获取日志获取日志的直接链接
检索系统日志,并可选择进行筛选:
const logs = await mastraClient.listLogs({
transportId: 'transport-1',
})
获取特定 run 的日志获取特定 run 的日志的直接链接
检索特定执行 run 的日志:
const runLogs = await mastraClient.getLogForRun({
runId: 'run-1',
transportId: 'transport-1',
})