Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/cleversoap/cpp-phantom-logger

A C++ macro based logger that hides itself from compilation when not in use.
https://github.com/cleversoap/cpp-phantom-logger

Last synced: 16 days ago
JSON representation

A C++ macro based logger that hides itself from compilation when not in use.

Awesome Lists containing this project

README

        

Phantom Logger
==============

A macro based logging class that is completely removed from compilation when not in use and supports logging to both stdout and a file.

To use simply define either the __\_LOG_PRINT___ macro (to log to stdout) and/or the __\_LOG_FILE___ macro with a filename to log to.

I have defined several log types already and these can be removed and added to at will as needed. You may also define whether or not the printed output should go to the std::cout or std::cerr streams via the macro definition.