Simple-Log  alpha-v0.7
Logger

Modules

 Logger Concepts
 

Classes

class  sl::log::BaseLogger< TRecord >
 Convenience class for generating Record s. More...
 

Functions

template<Logger TLogger, class... TArgs>
TLogger makeLogger (Core< LoggerRecord_t< TLogger >> &core, TArgs &&... args)
 Creates a Logger object and setup its callback to the given Core instance. More...
 

Detailed Description

Function Documentation

◆ makeLogger()

template<Logger TLogger, class... TArgs>
TLogger makeLogger ( Core< LoggerRecord_t< TLogger >> &  core,
TArgs &&...  args 
)
related

Creates a Logger object and setup its callback to the given Core instance.

Template Parameters
TLoggerConcrete Logger type
TArgsConstructor argument types (will be deducted automatically)
Parameters
coreThe core instance the Logger object should contribute to.
argsThe constructor arguments for the newly generated Logger object. Will be forwarded as is.
Returns
Logger object

This function creates a new Logger object and returns it to the caller. This Logger will receive a callback to the given Core instance, but Core does not take over ownership of the created Logger object. If users does not need the Logger object any longer, they may simply let them go out of scope.