Skip to content
Simple, lightweight Logger written in C++
C++ Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

##Simple, Lightweight Logging



Specify a filename when constructing:

Logger example("FILENAME");

Log lines will be written to this file. Use the << operator to direct messages to the log stream and indicate the log level. If the log level is omitted, it defaults to verbose:

example << ERROR << "Out of Memory!" << std::endl;

This line will look like this in the log file:

Sat Mar 15 08:06:58 2014 -- [ERROR] -- Out of Memory!

If you dont care for the formatting, change the code :)

You must end the line with an endl. This tells the logger to write the line and prepend the timestamp to the line as well.

You can change the logging level like so:


The level defaults to VERBOSE is one is never set, and this can be changed via set_default_line_level

Note: This library requires C++11 compiler support

You can’t perform that action at this time.