Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.2.10
-
None
-
N/A (compiled against .NET 2.0)
Description
I had a requirement for my project that the ops team be notified every time the number of error-level or higher alerts logged system-wide was more than a certain threshold in any given day. (i.e. notify ops after every 25 errors, but reset the count every day, so there might be multiple notifications on a single day if the error log were getting flooded, but a few errors per day will not raise the alarm.) I think this might be of use for other people's projects as well, so I thought I would contribute the code. To use it, the service calling the remote sink would pass in a named logger and a threshold to an overloaded constructor. If no logger is passed in to the constructor, the plugin will use its original behavior with no performance implication beyond one check for null.
Please see attached code.