コード例 #1
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            var opts = AppErrorthAlerting.GetOptions();

            context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(opts));
        }
コード例 #2
0
 public dynamic SetAppErrOpts(int interval = 5, int errorCountLimit = 100, int errorGrowthLimit = 100, string emailReceivers = "")
 {
     //var interval = Convert.ToInt32(Request.Query["interval"]);
     //var errorCountLimit = Convert.ToInt32(Request.Query["errorCountLimit"]);
     //var errorGrowthLimit = Convert.ToInt32(Request.Query["errorGrowthLimit"]);
     //var emailReceivers = Request.Query["emailReceivers"];
     AppErrorthAlerting.SetOptions(interval, errorCountLimit, errorGrowthLimit, emailReceivers);
     return("{'status':1}");
 }
コード例 #3
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            var interval         = Convert.ToInt32(context.Request["interval"]);
            var errorCountLimit  = Convert.ToInt32(context.Request["errorCountLimit"]);
            var errorGrowthLimit = Convert.ToInt32(context.Request["errorGrowthLimit"]);
            var emailReceivers   = context.Request["emailReceivers"];

            AppErrorthAlerting.SetOptions(interval, errorCountLimit, errorGrowthLimit, emailReceivers);
            context.Response.Write("{'status':1}");
        }
コード例 #4
0
ファイル: BackgroundTask.cs プロジェクト: qcjxberin/Logging-1
 static void CheckAlerting()
 {
     while (true)
     {
         try
         {
             BaseAlerting alert = new AppErrorthAlerting();
             alert.Alert();
         }
         catch (ThreadAbortException tae)
         {
             Thread.ResetAbort();
             FileLogger.Log(tae);
         }
         catch (Exception ex)
         {
             FileLogger.Log(ex);
         }
         finally
         {
             Thread.Sleep(1000 * 60);
         }
     }
 }
コード例 #5
0
        public dynamic GetAppErrOpts()
        {
            var opts = AppErrorthAlerting.GetOptions();

            return(Newtonsoft.Json.JsonConvert.SerializeObject(opts));
        }