Skip to content

dead simple single-header library to display some colored log messages

License

Notifications You must be signed in to change notification settings

SilentVoid13/Silent_Log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Silent_Log

This is a dead simple single-header library to display some colored log messages, based on ANSI colors.

It offers the following functions:

  • LOG_INFO
  • LOG_ERROR
  • LOG_WARN
  • LOG_DEBUG

Usage

To use it in your code, just include the header file log.h.

// if debug is not set, LOG_DEBUG is suppressed
#define DEBUG
#include "log.h"


int main() {
    LOG_INFO("This is an info message\n");
    LOG_ERROR("This is an error message\n");
    LOG_WARN("This is a warning message\n");

    int a = 1, b = 2, c = a + b;
    LOG_INFO("%d + %d = %d !\n", a, b ,c);

    LOG_DEBUG("This is a debugging message\n");

    return 0;
}

License

Silent_Log is licensed under the GNU AGPLv3 license. Refer to LICENSE for more informations.

About

dead simple single-header library to display some colored log messages

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages