public async Task LoadFileInfoAsync(IGoogleDriveFile file, CancellationToken ct, IProgress <string> process) { try { var fileInfo = await DoLoadFileInfoAsync(file, ct, process); FileInfo = fileInfo; } catch (Exception ex) { Log.Warn("Failed to load file info: " + file + "\n" + ex); FileInfo = new GoogleDriveFileInfoInvalid(file); } }
/// <summary> /// Generates a warning in the log with the message, priority and arguments specified /// </summary> /// <param name="facade">Logger facade to use</param> /// <param name="priority">Priority to use</param> /// <param name="msg">Message to use</param> /// <param name="args">Arguments for the message</param> public static void Warn(this ILoggerFacade facade, Priority priority, string msg, params object[] args) { facade.Warn(CultureInfo.CurrentCulture, priority, msg, args); }
/// <summary> /// Generates a warning in the log with the message and arguments specified /// </summary> /// <param name="facade">Logger facade to use</param> /// <param name="msg">Message to use</param> /// <param name="args">Arguments for the message</param> public static void Warn(this ILoggerFacade facade, string msg, params object[] args) { facade.Warn(Priority.Low, msg, args); }