본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)16k · #10841

add-logging

하는 일

이 스킬은 배포 전에 코드에 유용한 로그 줄을 추가해, 나중에 문제를 이해할 수 있도록 합니다. 눈을 가리고 디버깅하지 않으려는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓기능이나 수정을 작성하거나 검토하면서 좋은 로그를 넣고 싶을 때.
  • ✓로그가 조용해서 버그를 진단하기 어려웠던 경우.
  • ✓곧 바뀔 코드 경로의 로그를 개선하고 싶을 때.

스킬 링크

https://github.com/ParadevAI/Paradev/blob/main/plugins/sazabi/skills/add-logging/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/ParadevAI/Paradev/blob/main/plugins/sazabi/skills/add-logging/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제가 하고 있는 결제 변경에 로깅을 추가해서, 나중에 결제가 왜 백업 경로로 넘어갔는지 알 수 있게 해 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 프로젝트가 이미 쓰는 로깅 방식에 맞추고, 실패와 동작을 바꾸는 결정마다 한 줄씩 추가합니다. 전체 데이터가 아니라 ID를 기록하며, 비밀 정보는 로그에 남기지 않습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Log what you will need to ask about

Every investigation in Sazabi is limited by what the code logged. The cheapest time to add the right lines is while the change is fresh. The job is a small number of structured lines that answer "what happened to this request, and why".

0. How the tools work

The Sazabi MCP server lists only two tools, search and execute. Browse Sazabi's operations with search and namespace: "sazabi" (an empty query without a namespace lists connected connectors, not Sazabi operations). Before calling one, repeat search with namespace: "sazabi", the hit's full name as the query, and includeInputSchema: true to load its arguments. Then run it with execute as { name, arguments }, the name copied from the hit (for example sazabi/logs.ask).

1. Match what is already there

Read how this repository logs: which logger, which field names, how request and trace IDs are attached. Ask sazabi/logs.ask for a sample of this service's recent lines to see the real shape. New lines must look like their neighbors; an investigation that has to join two naming schemes is slower.

2. Pick the lines

On the changed path, log:

  • Failures with the error, the input that caused it (IDs, not payloads), and what the code did next (retry, fallback, give up).
  • Decisions that change behavior: a feature flag, a fallback, a skipped step, a limit hit.
  • Boundaries: calls to other services or queues, with target, outcome and duration.

Skip lines that restate the obvious ("entering function").

3. Shape each line

  • A stable event name (checkout.payment_declined), so a question can count it.
  • Structured fields, not values glued into the message string.
  • IDs that join the story: request or trace ID, user or tenant ID, order ID.
  • The right level: ERROR for failures someone must act on, WARN for degraded but handled, INFO for decisions, DEBUG for detail that is off in production.
  • Never secrets, tokens, passwords or full personal data. Redact or omit.

4. Check it

Run the path locally or in tests and read the lines it emits. After deploy, ask Sazabi for the new event name to confirm the lines arrive with their fields.

Anti-patterns

  • Logging payloads. They leak data and cost money; log IDs and sizes.
  • ERROR for expected outcomes. A declined card is INFO; an ERROR should mean a broken system.
  • Many lines per request in a hot loop. Log the summary, not every iteration.
자주 묻는 질문

로그에 고객 데이터가 들어가나요?

아니요. 전체 페이로드 대신 ID를 기록하고, 비밀 정보는 로그 줄에 넣지 않습니다.

프로젝트의 기존 스타일을 따르나요?

네. 코드가 이미 로그를 남기는 방식을 읽어서, 새 줄이 주변과 맞도록 합니다.

배포 전에 로그를 추가하는 이유는 무엇인가요?

조사는 기록된 내용에 따라 제한되므로, 변경이 신선할 때 올바른 줄을 추가하는 것이 가장 저렴합니다.

상세 정보

작성자의 원본 설명

Before shipping a change, add structured log lines to the code path it touches so the next investigation has evidence — one line per decision and failure, with stable event names and the IDs needed to join requests, at the right level and without secrets. Use when writing or reviewing a feature or fix, when a bug was hard to diagnose because the logs were silent, or when the user asks to improve logging or observability in code.

repo: ParadevAI/Paradev

인기도

GitHub 스타
16k
순위
#10841
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬