Exemplo n.º 1
0
        public static void LogError(string ex, bool notifyDistributor = false)
        {
            string msgToLogLong = "Message: " + ex;

            SerilogLogger.LogErrorAsync(msgToLogLong);
            SmsHelper.NotifyAdmin(msgToLogLong);
            if (notifyDistributor)
            {
                SmsHelper.NotifyDitributor(msgToLogLong);
            }
            EmailHelper.SendErrorMail(msgToLogLong);
        }
Exemplo n.º 2
0
        public static void LogError(Exception ex, string additionalMsg = "", bool notifyDistributor = false)
        {
            string msgToLogShort = ex.Message + Environment.NewLine + additionalMsg;
            string msgToLogLong  = "Message: " + ex.Message + "InnerException: " + ex.InnerException + "StackTrace: " + ex.StackTrace + Environment.NewLine + additionalMsg;

            SerilogLogger.LogErrorAsync(msgToLogLong);
            SmsHelper.NotifyAdmin(msgToLogShort);
            if (notifyDistributor)
            {
                SmsHelper.NotifyDitributor(msgToLogShort);
            }
            EmailHelper.SendErrorMail(msgToLogLong);
        }