Esempio n. 1
0
 /// <summary>
 /// write log
 /// </summary>
 /// <param name="level"></param>
 /// <param name="log"></param>
 public static void Log(LoggerLevel level, string log)
 {
     ConsulLog?.Invoke(new LoggerInfoEventArgs
     {
         Level   = level,
         Content = log
     });
 }
Esempio n. 2
0
 /// <summary>
 /// write log
 /// </summary>
 /// <param name="level"></param>
 /// <param name="log"></param>
 public static async Task LogAsync(LoggerLevel level, string log)
 {
     await Task.Run(
         () =>
         ConsulLog?.Invoke(new LoggerInfoEventArgs
     {
         Level   = level,
         Content = log
     })
         );
 }