AlexanderFabisch/OpenANN — pull request #23 by Ruun (2013-04-14 23:10:37+00:00)
Title: Introduce a new status messaging concept based on a popular c++ article

I've add a new status messaging class that supports a more global way how you can output messages (e.g. error, info, debug) within any implementation.

It provides the following features:
- Differing and Adjusting different log levels (error, info, debug). This can be also changed for better level descriptions (Its only an example)
- Provides fixing a logging level at compile time (In this case the g++ optimizer adjust all level checks directly and remove several runtimes checks)
- Changing Default outputstream to another target (std::cout, std::cout, other types of std::ostring&)
- No logging instance is necessary anymore in any class definition.

Usage:
Include: #include

OPENANN_INFO << "Info status message";
OPENANN_DEBUG << "debug status message";
OPENANN_ERROR << "error status message";

OpenANN::Log::Level() = OpenANN::Log::kDisabled;
OpenANN::Log::Level() = OpenANN::Log::kInfo;

OpenANN::Log::Stream() = std::cerr;

Current logging format:
* DEBUG 2013-04-15 01:05:00 This is a simple status message
* Can also be changed to a more appropriate format.

This implementation is based on the popular c++ article about logging.
http://www.drdobbs.com/cpp/logging-in-c/201804215