https://github.com/diegomrno/dilog
A tiny, modern, and safe logging library
https://github.com/diegomrno/dilog
c header-only logging minimalist simple
Last synced: about 1 year ago
JSON representation
A tiny, modern, and safe logging library
- Host: GitHub
- URL: https://github.com/diegomrno/dilog
- Owner: diegomrno
- License: mit
- Created: 2025-04-19T11:27:24.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-19T16:57:55.000Z (about 1 year ago)
- Last Synced: 2025-04-23T21:15:38.276Z (about 1 year ago)
- Topics: c, header-only, logging, minimalist, simple
- Language: C
- Homepage:
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Security: SECURITY.md
Awesome Lists containing this project
README
# **dilog** - A tiny, modern, and safe logging library
> Work in progress...
**dilog** is a tiny, minimalistic logging utility designed for simplicity, security, and modern C standards. It's lightweight, memory-safe, thread-safe, and highly configurable for all your logging needs. Whether you're building a small utility or a large application, `dilog` is here to make logging easy and efficient.
> **Why this project**: Because I personally needed a really simple logging system tailored to my needs and I didn’t want to embed a full-blown *nuclear submarine* into my projects just to print "Hello, world!".
## **Usage**
To use `dilog`, simply include the `dilog.h` header file in your project. No external dependencies are required.
### Hello world with dilog
```c
#include "../dilog.h"
int main() {
dilog_init();
dilog("Hello, world!");
return 0;
}
```
(more doc incoming)
## **Features**
- 🗂️ **Topic System**: Log with flexible "profiles" (topics) that allow full customization — format, output options, and more.
- 🏷️ **Typed Logs**: Easily log messages as `error`, `info`, `warn`, or any custom-defined type.
- 💾 **[WIP] Log to a File**: Send your logs to a file for persistent tracking.
- 🌐 **Cross-Platform**: Works seamlessly on Linux, macOS, and Windows, no dependencies needed.
- 🎨 **Hex Color Support**: Customize your logs with full hex color codes for better readability and style.