zang-langyan / LogSystem

A Colorful Logging System Helps Track All Status During Development Or Program Running

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LogSystem

Created by Langyan Zang

This repository is meant to help my C++ Game Engine development. The simple macros defined in it can display colorful information, showing priority, during runtime. Also, it is totally customizable.

Usage

Simply include LogSystem.h file in your project, and all set. Customize it as you like.

The following shows an example and the output in on Mac OS iTerm terminal.

#include "LogSystem.h"

#define MY_INFO(s) LOG("MY Customized INFO: " s, "1;3;7;", "106;33")

int main(){
  INFO("LogSystem Built by 朗彦");
  TRACE("Example Trace.");
  WARN("Program is Warning!");
  ERROR("Program runs into trouble!");
  DEBUG("debug here.");

  LOG("Cutomize your log with this", "1;3;7;","106;31");

  MY_INFO("你好");
}

The output of the example included in this repository is as follows, which runs on iTerm on Mac OSX. example.cpp

About

A Colorful Logging System Helps Track All Status During Development Or Program Running

License:GNU General Public License v3.0


Languages

Language:C++ 100.0%