/// <summary> /// Create a log sink, when registered, automatically forward all logs to TfInvoke.LogMsgReceived event handler. /// By default it is not registered to received log. /// Use TfInboke.AddLogSink to register it. /// </summary> /// <param name="autoRegisterLogSink">If true, it will register the LogSink right after it is created, and will de-register the LogSink right before it is disposed.</param> public LogForwarderSink(bool autoRegisterLogSink = false) { _ptr = TfInvoke.tfeLogForwarderSinkCreate(ref _logSinkPtr); if (autoRegisterLogSink) { TfInvoke.AddLogSink(this); } _autoRemoveLogSink = autoRegisterLogSink; }