/// <summary> /// Logs the specified message. /// </summary> /// <param name="msg">The MSG.</param> public static void LogWarning(string msg, LogAction action = LogAction.LogOnly) { try { Log.Warning(msg); if (action == LogAction.LogAndShow) { WarningLogged?.Invoke(null, DateTime.Now + " : " + msg); } } catch (Exception) { } }
public static void Warning(Exception exception, string message) { Instance?.Warning(exception, message); WarningLogged?.Invoke(null, new MessageWithExceptionLoggedEventArgs(message, exception)); }