I searched this and couldn't find an answer. How many entries can the event viewer hold?
I am trying to log the origination of a rest request as I have multiple applications that call a single api. I want to log all of these requests in the event viewer using Serilog.
In production I will be able to pull these stats in Splunk.
Is this bad practice to log millions of entries to the Event Viewer? We literally can have up to 2million calls perday from different sources to this Net WebAPi.
I wanted to go the db route to log this information but my db admin said no way. There is no way to pull this from files so that is out of the equation.
Log.Logger = new LoggerConfiguration()
.WriteTo.EventLog("Sample App", manageEventSource: true)
.CreateLogger();
Log.Information("Hello, Windows Event Log!");
Log.CloseAndFlush();
private void CallApi()
{
Log.Information("Request originated from " + System.Environment.MachineName);
//Call Web Api below
}