Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 765 Bytes

README.md

File metadata and controls

29 lines (19 loc) · 765 Bytes

console.log

I hate typing std::cerr << blah << " " << blah << std::endl; especially after I got used to the browser Javascript console.log(blah,blah) so I made this.

And it's got a colorized output (when stderr is outputing to console) and more! Setting log level is also supported.

Integration

You only need to include the file consolelog.hpp and start using console.log in your project!

Note that you should use C++11 or above.

Usage

console.log(...);
console.info(...);
console.warn(...);
console.error(...);

console.time("label"); // label name can be omitted; same below
console.timeLog("label");
console.timeEnd("label");
console.count("label");
console.countReset("label");

See example_advanced.cpp for more usage.