Beispiel #1
0
        /// <summary>
        /// Global error monitor function that will be triggered whenever errors
        /// pass the specified sliding window threshold.
        /// </summary>
        /// <param name="filter">The <see cref="TraceFilter"/> that caused the error
        /// trigger to fire.</param>
        public static void ErrorMonitor(
            [ErrorTrigger("00:30:00", 10)] TraceFilter filter, TextWriter log)
        {
            // send a SMS notification
            _notifier.WebNotify(filter);

            // log last 5 detailed errors to the Dashboard
            log.WriteLine(filter.GetDetailedMessage(5));
        }