{"action":"opened","issue":{"url":"https://api.github.com/repos/aspnet/Logging/issues/389","repository_url":"https://api.github.com/repos/aspnet/Logging","labels_url":"https://api.github.com/repos/aspnet/Logging/issues/389/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Logging/issues/389/comments","events_url":"https://api.github.com/repos/aspnet/Logging/issues/389/events","html_url":"https://github.com/aspnet/Logging/issues/389","id":140831061,"number":389,"title":"Proposal/feature: Auto-incremented event ids","user":{"login":"artganify","id":10180180,"avatar_url":"https://avatars.githubusercontent.com/u/10180180?v=3","gravatar_id":"","url":"https://api.github.com/users/artganify","html_url":"https://github.com/artganify","followers_url":"https://api.github.com/users/artganify/followers","following_url":"https://api.github.com/users/artganify/following{/other_user}","gists_url":"https://api.github.com/users/artganify/gists{/gist_id}","starred_url":"https://api.github.com/users/artganify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artganify/subscriptions","organizations_url":"https://api.github.com/users/artganify/orgs","repos_url":"https://api.github.com/users/artganify/repos","events_url":"https://api.github.com/users/artganify/events{/privacy}","received_events_url":"https://api.github.com/users/artganify/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-15T00:01:32Z","updated_at":"2016-03-15T00:01:32Z","closed_at":null,"body":"The current `Log` invocation on the main `ILogger` requires an `EventId` which is, in my opinion a pretty useful thing (though it could also be just an optional event property because not every company/product/framework works with event ids in the first place). What I'm worrying about a little is the fact that it's an *id*, meaning an *identifier* and thus should be unique within a certain scope. This however is not the case for some of the extension methods provided by `LoggerExtensions`, for instance `public static void LogDebug(this ILogger logger, string message, params object[] args)` internally calls the API like this:\r\n\r\n    logger.Log(LogLevel.Debug, 0, new FormattedLogValues(message, args), null, _messageFormatter);\r\n\r\nIf I call the extension method twice, it means two application messages will inevitably get the same event id (0).\r\n\r\nSuggenstions:\r\n\r\n* Make the `EventId` a reference type (still with implicit cast to `int`?) so a `null` value can be provided (Results in: This event has no event id).\r\n\r\n* ...or maybe create a static counter where each non-client submitted event id is automatically incremented (e.g. atomic). Though I'm not sure if that would work for the following case:\r\n\r\n    logger.LogDebug(10, \"Event id is 10\"); // internal counter: 10\r\n    logger.LogDebug(\"Event id should be 11\"); // internal counter 10 + 1\r\n    logger.LogDebug(9, \"... and now it's again less than 10?\"); // reset counter? or just ignore?"}}