日志 API
🌐 Logs API
日志 API 提供了在 Mastra 中访问和查询系统日志及调试信息的方法。
🌐 The Logs API provides methods to access and query system logs and debugging information in Mastra.
获取日志Direct link to 获取日志
🌐 Getting Logs
检索系统日志,可选择性过滤:
🌐 Retrieve system logs with optional filtering:
const logs = await mastraClient.listLogs({
transportId: "transport-1",
});
获取特定运行的日志Direct link to 获取特定运行的日志
🌐 Getting Logs for a Specific Run
检索特定执行运行的日志:
🌐 Retrieve logs for a specific execution run:
const runLogs = await mastraClient.getLogForRun({
runId: "run-1",
transportId: "transport-1",
});