adam4813/Sigma — pull request #75 by Zardoz89 (2013-12-11 19:31:12+00:00)
Title: Logger class added

Implements a quick and dirty **Logger class** with log levels and with a preprocessor define that can disable totally (making the code empty). Also include preprocessor macros to quick type the Log messages.

To enable the Logger, a **#define _DEBUG 1** must be declared before the **#include "Logger.h"**.
We can remove the preprocessor ***define*** if you think that is a good idea.

It uses two static global vars (Yes I know...) that stores the Logger actual level and the output stream.
By default are set to output to std::clog and to DEBUG log level.
An future improvement should be move the two static vars inside of the class and add a static method for initialization.

src/main.cpp add a few lines as a example of basic usage ...
An example :

LOG << "Info log message " << 3.1416 << " Hey And I can chain!";

Outputs :

[INFO] Info log message 3.1416 Hey And I can chain!