# Logging Best Practice Skill

> describe how to do the logging in the codebase, use when you need to add logger to the codebase Use when this capability is needed.

- Skill: `tomevault-io/logging-best-practice-skill` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/logging-best-practice-skill`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/logging-best-practice-skill/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/logging-best-practice-skill

---


# logging best practices
the document outlines the best practices for logging in the codebase.

## when to use this skill
when you need to add logger to the codebase, when you need to debug the codebase, when you need to add logging to the codebase

## best practices
+ always try to use third party logging library whenever possible, then use the built-in logging library, don't use print statement to log the message
+ you should always log the message with proper logging message, detailed describe the current context of the code
+ you should always log the additional information along with the message, like the request id, user id, processed message count ... etc.
+ make sure every log message have a proper logging level, don't use the same logging level for all the messages
+ for golang, use zap logger, logrus
+ for python, use the built-in logging library with customized formatter, please check [logger.py](references/logger.py)

---
> Source: [ambersun1234/skills](https://github.com/ambersun1234/skills) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-06-03 -->

