コード例 #1
0
 internal ClientExceptionLoggerEvent(ClientWatson watson)
 {
     this.watson = watson;
     this.datapointProperties = new Dictionary <string, object>
     {
         {
             "TIME",
             watson.Time
         },
         {
             "MSG",
             HttpUtility.UrlEncode(watson.Message)
         },
         {
             "URL",
             watson.Url
         },
         {
             "LOC",
             HttpUtility.UrlEncode(watson.Location)
         },
         {
             "REQID",
             watson.RequestId
         },
         {
             "ST",
             HttpUtility.UrlEncode(watson.StackTrace)
         }
     };
 }
コード例 #2
0
 public string ReportWatson(ClientWatson report)
 {
     if (report != null)
     {
         try
         {
             ClientExceptionLogger.Instance.LogEvent(new ClientExceptionLoggerEvent(report));
         }
         catch
         {
         }
     }
     return("OK");
 }