truefoundry-logs

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Routing note: For ambiguous user intents, use the shared clarification templates in references/intent-clarification.md.
<objective>
路由说明:如果用户意图不明确,请使用references/intent-clarification.md中的通用澄清模板。
<objective>

Logs

日志

View and download application and job logs from TrueFoundry.
查看并下载TrueFoundry中的应用和任务日志。

Scope

适用范围

View, download, and search application and job logs from TrueFoundry. Useful for debugging deployments, checking startup output, and finding errors.
</objective> <instructions>
查看、下载并搜索TrueFoundry中的应用和任务日志,可用于调试部署、检查启动输出以及排查错误。
</objective> <instructions>

Download Logs

下载日志

Security: Log output may contain sensitive data (secrets, tokens, PII). Do not forward raw logs to external services or include them in responses without reviewing for sensitive content first.
When using direct API, set
TFY_API_SH
to the full path of this skill's
scripts/tfy-api.sh
. See
references/tfy-api-setup.md
for paths per agent.
安全提示: 日志输出可能包含敏感数据(密钥、令牌、个人可识别信息PII),在将原始日志转发到外部服务或加入响应内容前,请先审查是否存在敏感内容。
直接调用API时,请将
TFY_API_SH
设置为当前skill的
scripts/tfy-api.sh
完整路径。各Agent对应的路径可查看
references/tfy-api-setup.md

Via Tool Call

通过工具调用

tfy_logs_download(payload={
    "workspace_id": "ws-id",
    "application_fqn": "app-fqn",
    "start_ts": "2026-02-10T00:00:00Z",
    "end_ts": "2026-02-10T23:59:59Z"
})
tfy_logs_download(payload={
    "workspace_id": "ws-id",
    "application_fqn": "app-fqn",
    "start_ts": "2026-02-10T00:00:00Z",
    "end_ts": "2026-02-10T23:59:59Z"
})

Via Direct API

通过直接API

bash
undefined
bash
undefined

Set the path to tfy-api.sh for your agent (example for Claude Code):

为你的Agent设置tfy-api.sh的路径(以下是Claude Code的示例):

TFY_API_SH=~/.claude/skills/truefoundry-logs/scripts/tfy-api.sh
TFY_API_SH=~/.claude/skills/truefoundry-logs/scripts/tfy-api.sh

Download logs for an app in a workspace

下载某个工作区下应用的日志

$TFY_API_SH GET '/api/svc/v1/logs/WORKSPACE_ID/download?applicationFqn=APP_FQN&startTs=START&endTs=END'
$TFY_API_SH GET '/api/svc/v1/logs/WORKSPACE_ID/download?applicationFqn=APP_FQN&startTs=START&endTs=END'

With search filter

带搜索过滤条件

$TFY_API_SH GET '/api/svc/v1/logs/WORKSPACE_ID/download?applicationId=APP_ID&searchString=error&searchType=contains'
undefined
$TFY_API_SH GET '/api/svc/v1/logs/WORKSPACE_ID/download?applicationId=APP_ID&searchString=error&searchType=contains'
undefined

Parameters

参数

ParameterAPI KeyDescription
workspace_id
(path)Workspace ID (required)
application_id
applicationId
Filter by app ID
application_fqn
applicationFqn
Filter by app FQN
deployment_id
deploymentId
Filter by deployment
job_run_name
jobRunName
Filter by job run
start_ts
startTs
Start timestamp (ISO 8601)
end_ts
endTs
End timestamp (ISO 8601)
search_string
searchString
Search within logs
search_type
searchType
contains
,
regex
pod_name
podName
Filter by pod
参数API Key描述
workspace_id
(路径参数)工作区ID(必填
application_id
applicationId
按应用ID过滤
application_fqn
applicationFqn
按应用FQN过滤
deployment_id
deploymentId
按部署实例过滤
job_run_name
jobRunName
按任务运行实例过滤
start_ts
startTs
起始时间戳(ISO 8601格式)
end_ts
endTs
结束时间戳(ISO 8601格式)
search_string
searchString
日志内搜索关键词
search_type
searchType
可选值
contains
(包含匹配)、
regex
(正则匹配)
pod_name
podName
按pod名称过滤

Presenting Logs

日志展示

Show logs in chronological order. For long output, show the last N lines or summarize errors:
Logs for tfy-tool-server (last 20 lines):
2026-02-10 14:30:01 INFO  Server starting on port 8000
2026-02-10 14:30:02 INFO  Tools endpoint ready at /tools
2026-02-10 14:30:05 INFO  Health check: OK
</instructions>
<success_criteria>
按时间顺序展示日志。如果输出过长,请展示最后N行或者汇总错误信息:
Logs for tfy-tool-server (last 20 lines):
2026-02-10 14:30:01 INFO  Server starting on port 8000
2026-02-10 14:30:02 INFO  Tools endpoint ready at /tools
2026-02-10 14:30:05 INFO  Health check: OK
</instructions>
<success_criteria>

Success Criteria

成功标准

  • The user can see recent logs for their application or job in chronological order
  • Error patterns in the logs are identified and highlighted with suggested fixes
  • The agent has filtered logs by the correct time range, application, and search terms
  • The user understands why their application failed or what its current behavior is
  • Log output is presented concisely, summarizing long output rather than dumping raw text
</success_criteria>
<references>
  • 用户可以按时间顺序查看自己的应用或任务的最近日志
  • 日志中的错误模式会被识别并高亮展示,同时提供修复建议
  • Agent已按照正确的时间范围、应用和搜索词过滤日志
  • 用户能够理解应用失败的原因,或者其当前的运行行为
  • 日志输出展示简洁,长输出会做汇总,而非直接输出全部原始文本
</success_criteria>
<references>

Composability

可组合性

  • Find app first: Use
    applications
    skill to get app ID or FQN
  • Find workspace: Use
    workspaces
    skill to get workspace ID
  • After deploy: Check logs to verify the app started
  • Debug failures: Download logs with
    searchString=error
</references> <troubleshooting>
  • 先查找应用: 使用
    applications
    skill获取应用ID或FQN
  • 查找工作区: 使用
    workspaces
    skill获取工作区ID
  • 部署后校验: 检查日志确认应用已成功启动
  • 调试故障: 使用
    searchString=error
    参数下载日志排查问题
</references> <troubleshooting>

Error Handling

错误处理

Missing workspace_id

缺少workspace_id

workspace_id is required for log downloads.
Use the workspaces skill to find your workspace ID.
workspace_id is required for log downloads.
Use the workspaces skill to find your workspace ID.

No Logs Found

未找到日志

No logs found for the given filters. Check:
- Time range is correct
- Application ID/FQN is correct
- The app has actually run during this period
No logs found for the given filters. Check:
- Time range is correct
- Application ID/FQN is correct
- The app has actually run during this period

Permission Denied

权限被拒绝

Cannot access logs. Check your API key permissions for this workspace.
</troubleshooting>
Cannot access logs. Check your API key permissions for this workspace.
</troubleshooting>