[WIP] Backward compatible and thread safe re-implementation of streamlog
Created by: rete
BEGINRELEASENOTES
- Transform
prefixandbase_prefixclasses to simple std::function - Set default log level to MESSAGE
- Modernized and simplified
logscopeclass
{
// 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
logconfighidden 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_localto make the global logger thread safe. Theglobal_init()function initialize the config which is shared by all thread local global loggers.
ENDRELEASENOTES
Superseeds #15