[WIP] Backward compatible and thread safe re-implementation of streamlog
Created by: rete
BEGINRELEASENOTES
- Transform
prefix
andbase_prefix
classes to simple std::function - Set default log level to MESSAGE
- Modernized and simplified
logscope
class
{
// create the scope object. Sets the logger config on creation
logscope scope( streamlog::out, "MyTrackingProcessor", "DEBUG" ) ;
// the scope object can be released before reaching the end of the scope
scope.release();
// the scope automatically releases here, settings back the old logger config
}
- Introduced
logconfig
hidden class to handle the global logger configuration - Changed API for global logger initialization:
// example in main()
streamlog::logstream::global_init( &std::cout, "Marlin", "MESSAGE" ) ;
- Use
thread_local
to make the global logger thread safe. Theglobal_init()
function initialize the config which is shared by all thread local global loggers.
ENDRELEASENOTES
Superseeds #15