I have a Minimal API web application and have enabled logging. Logging is working however the Event ID's don't show up in Azure logs.
I have a call to AddAzureWebAppDiagnostics() at the beginning of the application.
builder.Logging.AddAzureWebAppDiagnostics();
Within the various endpoints I call LogInformation and pass in an event id. It logs the event but the eventID is never shown in the logs. This call
app.Logger.LogInformation(Events.UserGet, "Getting UserInformation: {UserGUID}", UserGUID);
produces the following in the App Logs within Azure.
2023-02-13 00:19:51.662 +00:00 [Information] Admin: Getting UserInformation: c8e7f5ba-445c-42f7-9e61-8869c8f1ace0
Am I missing something? Ideally the event would include the corresponding Event ID. I've included an excerpt of the Event ID's class below.
public class Events
{
//...
public const int UserGet = 1601;
//...
}
Thanks