LordOfTrident / clog

A logging library for C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

!This project has been moved to chol!

clog

License Issues GitHub pull requests


A simple single-header STB-style C library for logging, inspired by log.c.

Table of contents

Simple example

#define CLOG_IMPLEMENTATION
#include "clog.h"

int main(void) {
	LOG_INFO("Hello, world!");
	LOG_WARN("I am a warning");
	LOG_ERROR("Something bad just happened!");
	LOG_FATAL("Something very bad happened, exiting...");

	return 0;
}

Output

Quickstart

Just copy clog.h into your project and include it, or submodule this repository and include the header. See the example to see how to use the library.

To compile and run the example, run

$ cc ./examples/log.c -o log
$ ./log

Bugs

If you find any bugs, please create an issue and report them.

About

A logging library for C

License:GNU General Public License v3.0


Languages

Language:C 100.0%