Claude-skill-registry debug-log
Printf-style debug logging for development-time visibility
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/debug-log" ~/.claude/skills/majiayu000-claude-skill-registry-debug-log && rm -rf "$T"
manifest:
skills/data/debug-log/SKILL.mdsource content
Debug Log
Printf-style logging for development and debugging. Compiles away completely in release builds.
Purpose
- Development-time visibility into program state
- Add arbitrary trace points during debugging
- Zero overhead in release builds
Usage
#include "debug_log.h" DEBUG_LOG("value=%d state=%s", x, state_name); DEBUG_LOG("=== Entering function ==="); DEBUG_LOG("buffer contents: %.*s", (int)len, buf);
Build Configuration
| Build | DEBUG defined | Behavior |
|---|---|---|
| Debug | Yes | Writes to |
| Release | No | Compiles to - removed entirely |
Initialization
In debug builds, call once early in
main():
#ifdef DEBUG ik_debug_log_init(); #endif
Or simply use the macro form (safe in any build):
ik_debug_log_init(); // No-op if DEBUG not defined
Output Format
[2025-01-15 10:30:00] src/client.c:34:main: === Session starting, PID=12345 ===
Format:
[timestamp] file:line:function: message
Log Location
- File:
in working directoryIKIGAI_DEBUG.LOG - Truncated on each run (via
)ik_debug_log_init
Inspecting Logs
tail -f IKIGAI_DEBUG.LOG
Alternate Buffer Note
ikigai runs in terminal alternate buffer mode.
printf() and fprintf(stderr, ...) are not visible during execution. Use DEBUG_LOG instead.
Source Files
- Macro definitionsrc/debug_log.h
- Implementation (excluded from coverage)src/debug_log.c