An EventId is an optional integer attached to a log entry. It helps you quickly find related events; when omitted, its value is 0. section 26.2
Choose distinct identifiers for recurring application events:
- Use 1000 when a user loads a recipe that does not exist. section 26.2
- Use 1001 when a user tries to access a recipe without permission. section 26.2
Event ID with generated logging
A LoggerMessage declaration can assign event ID 10 to an information-level message: [LoggerMessage(10, LogLevel.Information, "Loaded {RecipeCount} recipes")]. Calling the generated method records the event with that identifier.

