debug-log

Implement printf-style debug logging with DEBUG_LOG macros in C programs.

Updated Mar 4, 2026
One-click install
npx skills add https://github.com/multicam/ikigai-rev --skill debug-log-multicam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug-log
Source: https://github.com/multicam/ikigai-rev/tree/main/.claude-i/library/debug-log
Command: npx skills add https://github.com/multicam/ikigai-rev --skill debug-log-multicam

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Printf-style logging for development-time visibility into program state, with zero overhead in release builds.

Core Features & Use Cases

  • Lightweight printf-style logging that compiles away in release builds.
  • Zero overhead in production code when DEBUG is not defined.
  • Easy integration via a single DEBUG_LOG macro that can be sprinkled across code.

Quick Start

Enable DEBUG builds and insert DEBUG_LOG statements in your code to emit runtime trace messages.

Frequently Asked Questions about debug-log

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add printf-style debug logging to C programs without affecting release builds?

You can use a DEBUG_LOG macro guarded by a DEBUG flag to add printf-style debug logging that compiles to a no-op in release builds. This provides real-time visibility during development with zero overhead in production code.

What is the best way to ensure zero overhead for debug logs in production C code?

The best way to ensure zero overhead is wrapping log statements in a DEBUG_LOG macro that compiles to a no-op when the DEBUG macro is not defined. This completely removes trace points from release builds, eliminating performance penalties.

How do I initialize printf-style trace points in a C development build?

To initialize printf-style trace points, call the ik_debug_log_init initializer function during setup, then sprinkle DEBUG_LOG statements across your code to emit runtime trace messages while the DEBUG macro is enabled.

Does this debug logging approach work with any C compiler or build system?

Yes, this lightweight debug logging approach works with standard C compilers by relying on compile-time macros. Because it uses a DEBUG guard, it integrates easily into existing C build systems without requiring external dependencies.

When should I not use compile-time debug macros for logging in C?

You should not use compile-time debug macros if you need runtime-configurable log levels or persistent production logging. The DEBUG_LOG macro is designed exclusively for dev builds and compiles away entirely when DEBUG is undefined.

Can I use DEBUG_LOG macros to trace program state in real-time during C development?

Yes, you can use DEBUG_LOG macros to gain real-time visibility into program state during execution. By sprinkling these statements across your code, you emit immediate trace messages that help monitor execution flow in dev builds.