Home -> LogTargetCallback -> Create
Description
The Create method creates a callback target and returns it wrapped in a smart pointer compatible with LogManager.AddLogTarget.
Usage
static std::unique_ptr<LogTargetCallback, ILogTarget::Deleter> Create(std::function<void(const std::string&, ILogger::Severity, const std::string&)> callback);
Argument list
- callback [std::function]
- The callback to invoke with the message scope, severity, and text.
Return value
- [LogTargetCallback]
- A newly constructed LogTargetCallback object wrapped in a smart pointer that uses ILogTarget::Deleter.