I am trying to log via the NLog MailTarget. It works just fine, but i wanted to wrap the mailtarget with the BufferedTargetWrapper to buffer the log messages un
BufferedTargetWrapper
According to the documentation your approach should not work, but it is fine. Just give the flush method an empty lambda expression:
LogManager.Configuration.AllTargets .OfType<BufferingTargetWrapper>() .ToList() .ForEach(b => b.Flush(e => { //do nothing here }));