log.c is a compact logging library implemented in C99 for projects that need useful runtime diagnostics without pulling in a large dependency. It provides six familiar logging levels, from trace through fatal, and uses printf-style formatting so developers can add structured messages with minimal learning curve. By default, it writes readable log lines to stderr with timestamps, levels, source file names, and line numbers. It also supports quiet mode, configurable log levels, file outputs, custom callbacks, and optional thread locking for multi-threaded programs. Developers can enable ANSI color output at compile time to make terminal logs easier to scan. The library is a practical fit for small C applications, tools, engines, and libraries that need clear logging while keeping the implementation simple.

Features

  • Six logging level macros
  • printf-style formatted messages
  • Configurable minimum log level
  • Optional quiet mode
  • File and callback log outputs
  • Optional ANSI color support

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow log.c

log.c Web Site

Other Useful Business Software
Ship Agents Faster Icon
Ship Agents Faster

Transform your applications and workflows into powerful agentic systems at global scale.

Gemini Enterprise Agent Platform lets you rapidly build, scale, govern and optimize production-ready agents grounded in your organization's data. The platform enables developers to build custom or pre-built agents for virtually any use case. New customers get $300 in free credits.
Get Started Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of log.c!

Additional Project Details

Programming Language

C

Related Categories

C Libraries

Registered

2026-05-11