Beispiel #1
0
        private void SendToTelegramAsync(ErrorLog err, Customers cust)
        {
            try
            {
                var message = $"Source:✨ #{err.Source.GetDisplay()} ✨ \r\n" +
                              $"Version:✏ {err.Version} ✏ \r\n" +
                              $"=========================== \r\n" +
                              $"ClassName: #{err.ClassName.Replace(" ", "_")} \r\n" +
                              $"FunctionName: #{err.FuncName.Replace(" ", "_")} \r\n" +
                              $"Type: {err.ExceptionType.Replace(" ", "_")} \r\n" +
                              $"Message: {err.ExceptionMessage} \r\n" +
                              $"Description: {err.Description}\r\n" +
                              $"=========================== \r\n" +
                              $"HardSerial: {err.HardSerial} \r\n" +
                              $"Customer:😉 #{(cust?.Name ?? "").Replace(" ", "_")} 😉 \r\n" +
                              $"Company:🏫 #{(cust?.CompanyName ?? "").Replace(" ", "_")} 🏫 \r\n" +
                              $"Tell1:📱 {cust?.Tell1 ?? ""} 📱 \r\n" +
                              $"Tell2:📱 {cust?.Tell2 ?? ""} 📱 \r\n" +
                              $"IP:🌐 {err.Ip} 🌐 \r\n" +
                              $"Date: {Calendar.MiladiToShamsi(err.Date)} \r\n" +
                              $"Time:🕟 {err.Time} 🕟 \r\n" +
                              $"https://aarad.ir/Arad-Manager/Home/Details/{err.Guid}";

                WebTelegramMessage.GetErrorLog_bot().Send(message);
            }
            catch (Exception ex)
            {
                WebErrorLog.ErrorInstence.StartErrorLog(ex);
            }
        }
Beispiel #2
0
        private void SendServerErrorToTelegramAsync(ErrorLog err)
        {
            try
            {
                var message = $"Source:✨ #{err.Source.GetDisplay()} ✨ \r\n" +
                              $"=========================== \r\n" +
                              $"ClassName: #{err.ClassName.Replace(" ", "_")} \r\n" +
                              $"FunctionName: #{err.FuncName.Replace(" ", "_")} \r\n" +
                              $"Type: {err.ExceptionType.Replace(" ", "_")} \r\n" +
                              $"Message: {err.ExceptionMessage} \r\n" +
                              $"Description: {err.Description}\r\n" +
                              $"=========================== \r\n" +
                              $"Date: {Calendar.MiladiToShamsi(err.Date)} \r\n" +
                              $"Time:🕟 {err.Time} 🕟 \r\n" +
                              $"https://aarad.ir/Arad-Manager/Home/Details/{err.Guid}";

                WebTelegramMessage.GetErrorLog_bot().Send(message);
            }
            catch (Exception ex)
            {
                WebErrorLog.ErrorInstence.StartErrorLog(ex);
            }
        }