Langsung ke konten
Skillpedia
API & server (backend)16k · #10841

add-logging

Fungsinya

Skill ini menambahkan baris log yang berguna ke kode sebelum dirilis, agar masalah bisa dipahami nanti. Cocok untuk pengembang yang ingin menghindari debugging tanpa petunjuk.

Kapan dipakai

  • ✓Saat Anda menulis atau meninjau fitur atau perbaikan dan ingin log yang baik sudah tersedia.
  • ✓Saat sebuah bug sulit didiagnosis karena log tidak mencatat apa-apa.
  • ✓Saat Anda ingin memperbaiki log pada jalur kode yang akan segera berubah.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/ParadevAI/Paradev/blob/main/plugins/sazabi/skills/add-logging/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit →

Contoh permintaan ke AI

“Tambahkan logging pada perubahan checkout yang sedang saya buat, supaya nanti kita bisa tahu mengapa pembayaran beralih ke rute cadangan.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent menyesuaikan gaya logging yang sudah dipakai proyek, lalu menambahkan satu baris untuk setiap kegagalan dan setiap keputusan yang mengubah perilaku. Ia mencatat ID, bukan data lengkap, dan menjaga rahasia tetap keluar dari log.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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.
Pertanyaan umum

Apakah log akan memuat data pelanggan?

Tidak. Skill ini mencatat ID, bukan muatan lengkap, dan menjaga rahasia tetap di luar baris log.

Apakah ia mengikuti gaya proyek yang sudah ada?

Ya. Ia membaca cara kode sudah membuat log, sehingga baris baru sesuai dengan yang ada di sekitarnya.

Mengapa menambahkan log sebelum rilis?

Investigasi dibatasi oleh apa yang sudah dicatat, dan menambahkan baris yang tepat paling murah dilakukan saat perubahan masih segar.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
16k
Peringkat
#10841
Lisensi
—
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa