logging-and-error-reporting
仓库创建 2021年7月9日最近提交 1 小时前SkillHot 收录 1 小时前
▸ 精选理由
明确日志级别与敏感数据处理,能显著提升故障诊断效率。
这个 Skill 做什么
在 Warp 代码库中何时记录日志与向 Sentry 报错的规范与示例。
告诉你在 Warp 代码里什么时候写日志、什么时候把问题发到 Sentry:日常诊断用 log::*(error/warn/info 等),只有需要完整错误事件和堆栈才用 report_error!。会指导如何选级别、用 safe_* 宏避免把敏感数据写入日志,并区分 breadcrumbs(面包屑)与完整的 Sentry 事件。
▸ 展开 SKILL.md 英文原文
How and when to log (log::* levels, safe_* macros) and report errors to Sentry (report_error!) in the Warp codebase. Use when adding or reviewing any logging or error reporting — picking a log level, deciding log vs. report_error!, keeping sensitive data out of logs, or surfacing an error to Sentry.
6.4w
Stars
5.4k
Forks
40
仓库内 Skill
积累中
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/warpdotdev/warp/master/.agents/skills/logging-and-error-reporting/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/warpdotdev/warp/master/.agents/skills/logging-and-error-reporting/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# logging-and-error-reporting Warp has two related ways to surface what happened at runtime: - **`log::*`** (`error!`/`warn!`/`info!`/`debug!`/`trace!`) — local diagnostics written to the terminal/log file and, on crash-reporting builds, uploaded to Sentry as **breadcrumbs** (context attached to the next captured event). - **`report_error!`** — captures a **structured Sentry event** (an actual issue) for errors worth engineering attention. ## How logs reach Sentry (important) On crash-reporting builds a `SentryLogger` wraps the logger (`warp_logging`). The filter: - `Error` / `Warn` / `Info` → **breadcrumb** only (not their own Sentry issue). - `Debug` / `Trace` → **dropped** from Sentry
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有