mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2025-12-30 05:18:18 +00:00
Removed Async code as we don't handle async ops anymore
This commit is contained in:
@@ -23,7 +23,6 @@ using Serilog.Sinks.Http;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@@ -59,10 +58,12 @@ namespace LogExporter.Strategy
|
||||
|
||||
#region public
|
||||
|
||||
public Task ExportAsync(List<LogEntry> logs)
|
||||
public void Export(List<LogEntry> logs)
|
||||
{
|
||||
var tasks = logs.Select(log => Task.Run(() => _sender.Information(log.ToString())));
|
||||
return Task.WhenAll(tasks);
|
||||
foreach (LogEntry logEntry in logs)
|
||||
{
|
||||
_sender.Information(logEntry.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion public
|
||||
|
||||
Reference in New Issue
Block a user