public static void Report( string subject, string body, IEnumerable <string> attachmentPaths, LogLevel logLevel = LogLevel.Info) { var startTime = DateTimeOffset.Now; var logLabel = $"Report #{++_logCounter}"; LogService.Log($"{logLabel}: {subject}", logLevel); var targetDirectory = PathHelper.Combine(Kit.DiagnisticsCurrentDirectory, ReportsDirectory); foreach (var client in Clients) { try { client.PushToReport(subject, body, attachmentPaths, targetDirectory); } catch (Exception reportException) { Debug.Fail(reportException.ToString()); // no throw for report exception } } LogService.Log($"{logLabel} completed at {TimeHelper.FormattedLatency(startTime)}"); }
public static string NativePath(string path) => PathHelper.Combine(Kit.BaseDirectory, Kit.WorkingDirectory, path);