예제 #1
0
 public void Log(LogParams logParams)
 {
     foreach (var provider in Providers)
     {
         provider.LogAsync(logParams).GetAwaiter().GetResult();
     }
 }
예제 #2
0
 public async Task LogAsync(LogParams logParams)
 {
     foreach (var provider in Providers)
     {
         await provider.LogAsync(logParams);
     }
 }
예제 #3
0
        public async Task WriteAsync(LogParams logParams, TextWriter textWriter)
        {
            await textWriter.WriteLineAsync(logParams.MessageType + ": " + logParams.Message);

            await textWriter.FlushAsync();
        }
 public async Task LogAsync(LogParams logParams)
 {
     await Task.Run(() => Console.WriteLine(logParams.MessageType + ": " + logParams.Message));
 }
예제 #5
0
 public async Task LogAsync(LogParams logParams)
 {
     await _txtLoggerWriter.WriteAsync(logParams, _writer);
 }