An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# **dilog** - A tiny, modern, and safe logging library

Build
Latest Release
Changelog

> 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.