internal void LogGenericInfo(string message, [CallerMemberName] string previousMethodName = null) { if (string.IsNullOrEmpty(message)) { LogNullError(nameof(message)); return; } Logger.Info($"{previousMethodName}() {message}"); }
internal static async Task RestartOrExit() { if (Program.RestartAllowed && Program.GlobalConfig.AutoRestart) { ArchiLogger.LogGenericInfo(Strings.Restarting); await Task.Delay(5000).ConfigureAwait(false); await Program.Restart().ConfigureAwait(false); } else { ArchiLogger.LogGenericInfo(Strings.Exiting); await Task.Delay(5000).ConfigureAwait(false); await Program.Exit().ConfigureAwait(false); } }