コード例 #1
0
 public void Log(ThrottleLogEntry entry)
 {
     if (null != traceWriter)
     {
         traceWriter.Info(entry.Request, "WebApiThrottle",
             "{0} Request {1} from {2} has been throttled (blocked), quota {3}/{4} exceeded by {5}",
             entry.LogDate, entry.RequestId, entry.ClientIp, entry.RateLimit, entry.RateLimitPeriod, entry.TotalRequests);
     }
 }
コード例 #2
0
 public void Log(ThrottleLogEntry entry)
 {
     if (entry.Request != null)
     {
         log.Warn(entry.Request, "CustomThrottlingHandler",
             "{0} Request {1} from {2} has been throttled (blocked), quota {3}/{4} exceeded by {5}",
             entry.LogDate, entry.RequestId, entry.ClientIp, entry.RateLimit, entry.RateLimitPeriod, entry.TotalRequests);
     }
 }
コード例 #3
0
 public void Log(ThrottleLogEntry entry)
 {
     traceWriter?.Info(
         entry.Request,
         "WebApiThrottle",
         "{0} Request {1} from {2} has been throttled (blocked), quota {3}/{4} exceeded by {5}",
         entry.LogDate,
         entry.RequestId,
         entry.ClientIp,
         entry.RateLimit,
         entry.RateLimitPeriod,
         entry.TotalRequests);
 }
コード例 #4
0
ファイル: ApiThrottleLogger.cs プロジェクト: loonison101/PB
 public void Log(ThrottleLogEntry entry)
 {
     _logger.Information("Throttle exceeded: {0} Request {1} from {2} key: {6} has been throttled (blocked), quota {3}/{4} exceeded by {5}", entry.LogDate, entry.RequestId, entry.ClientIp, entry.RateLimit, entry.RateLimitPeriod, entry.TotalRequests, entry.ClientKey);
 }