What makes a log event id unique in ASP.NET Core?

258 views Asked by At

When logging w/ event id's like this: logger.LogInformation(1001, "Getting item {Id}", id);

How do I query a semantic or structured log, for those events? What are the key(s)? I'm guessing EventId.Id + SourceContext? (There's no guarantee the id I want to use isn't used by some other library so I must have to use EventId.Id plus some other field, right?)

When reviewing the official docs, Log event ID, I didn't see any recommendations on this topic. I only found this:

Some logging providers store the event ID in a field, which allows for filtering on the ID.

0

There are 0 answers