I found some ways to call an async method on a sync method, but I don't know what is the best way in .net core and why?
DebugLog.Log(ex.ToString()).GetAwaiter();
System.Threading.Tasks.Task.Run(async () => await DebugLog.Log(ex.ToString()));
DebugLog.Log(ex.ToString()).RunSynchronously();
DebugLog.Log(ex.ToString()).ConfigureAwait(default);