/// <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 }); }
/// <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 }) ); }