public static void LogAppDomainExceptions([NotNull] ILogger logger) { logger = logger.ArgumentNotNull(); if (_appDomainExceptionLogger is null) { _appDomainExceptionLogger = logger; AppDomain.CurrentDomain.FirstChanceException += CurrentDomain_FirstChanceException; EasyLogger.LogInformation(logger, $"Starting to capture all exceptions on {DateTime.UtcNow} UTC"); } }
public static void LogApplicationInformation([NotNull] ILogger logger) { logger = logger.ArgumentNotNull(); AppInfo appInfo = App.AppInfo; System.Collections.Immutable.ImmutableDictionary <string, string> values = TypeHelper.GetPropertyValues(appInfo); if (values?.FastCount() > 0) { foreach (KeyValuePair <string, string> item in values.OrderBy(p => p.Key)) { EasyLogger.LogInformation(logger, $"{nameof(AppInfo)}:{item.Key} - {item.Value}"); } } }