Skip to content

A lightweight C++ Logging tool that uses c++11's templated variadic functions

License

Notifications You must be signed in to change notification settings

wrossmck/logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

#Custom Logger ######This logger is mostly a look into how c++11 does variadic functions, and how I can couple it with tempting to make a simple logger

##Installation

  1. Download the .hpp file.
  2. Add it to your project, and include it.
  3. define a macro such as #define WROSSMCKLOGGER = <value> it defaults to Verbose (VERB)

##Usage

The method is _log(<value>, <item>, ...) where <value> can be one of {DISABLED, ERR, NORM, DEB, VERB}. And <item> is any type that can be fed to std::cout or std::cerr.

###Note an std::endl is added at the end of a method call.

##Example Usage

#!c++
	#define WROSSMCKLOGGER NORM
	#include "wrossmckLogger.hpp"
	
	<...>
	
	_log(NORM,"DIST");
	_log(NORM,"My distance Value is : ",f1," units");

##Example Output

	DIST
	My distance Value is : 10.5 units

About

A lightweight C++ Logging tool that uses c++11's templated variadic functions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages