A logging framework
- Customizable log-levels
- Active levels can be adjusted at run-time.
- Support for custom output channels (inherit from
lout::output::IOutput
) - Filtering - log messages can be categorized with a custom string which enables filtering on that category.
- Priority categories - if a message is tagged with a priority category, it will be logged regardless of active level.
- Operator overloading for short-hand logging.
- Fallback to std::cerr (or custom stream) in case of issues with getting things written to the output.
- Output handlers for File, Rolling Files and
std::cout
. - Ready-to-use log levels (Info, Warning, Error, Vebose, Debug).
- Customizable logging output format
- Customizable thread synchronization mechanism
##Usage Please see the test project for examples on how to setup, configure and use Lout. Here's a hint though: LoutLogger is the class you want to use. Have a look at the top of the test project for how you can use macros to reduce typing and to define 'named' loggers for different log levels and categories.
##Getting the source The test project uses Catch (https://github.com/philsquared/Catch) for testing and rlutil (https://github.com/tapio/rlutil) for colored output so you need that cloned too.
Use git clone --recursive https://github.com/PerMalmberg/lout.git
Requires a C++ 11 compliant compiler.
Standard CMakeLists.txt files included, directly usable by CLion etc. To compile in MSVC on Windows, do:
cd <path root of project> mkdir build cd build cmake -G "Visual Studio 14 2015" ..
then open the generated solution.
For reference, these are the commands I used to build boost filesystem libraries
./b2 --prefix=/usr/local/boost_1_61_0 --with-libraries=filesystem link=static threading=multi runtime-link=static variant=release
b2 --with-filesystem variant=release link=static address-model=64 install