{"action":"created","issue":{"url":"https://api.github.com/repos/NLog/NLog/issues/825","repository_url":"https://api.github.com/repos/NLog/NLog","labels_url":"https://api.github.com/repos/NLog/NLog/issues/825/labels{/name}","comments_url":"https://api.github.com/repos/NLog/NLog/issues/825/comments","events_url":"https://api.github.com/repos/NLog/NLog/issues/825/events","html_url":"https://github.com/NLog/NLog/issues/825","id":98950941,"number":825,"title":"Support C# 6 interpolated strings through IFormattable and/or FormattableString","user":{"login":"stylpe","id":99851,"avatar_url":"https://avatars.githubusercontent.com/u/99851?v=3","gravatar_id":"","url":"https://api.github.com/users/stylpe","html_url":"https://github.com/stylpe","followers_url":"https://api.github.com/users/stylpe/followers","following_url":"https://api.github.com/users/stylpe/following{/other_user}","gists_url":"https://api.github.com/users/stylpe/gists{/gist_id}","starred_url":"https://api.github.com/users/stylpe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stylpe/subscriptions","organizations_url":"https://api.github.com/users/stylpe/orgs","repos_url":"https://api.github.com/users/stylpe/repos","events_url":"https://api.github.com/users/stylpe/events{/privacy}","received_events_url":"https://api.github.com/users/stylpe/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NLog/NLog/labels/feature","name":"feature","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2015-08-04T11:54:42Z","updated_at":"2016-08-19T12:11:56Z","closed_at":null,"body":"The new string interpolation syntax in C# 6 has a drawback when used with NLog: It performs the interpolation regardless of which log levels are enabled (since it has to be passed as a string to NLog; I haven't found any evidence to the contrary at least). It should be possible to avoid this if we can pass the interpolated string as IFormattable or FormattableString.\r\n\r\nhttps://msdn.microsoft.com/en-us/library/dn961160.aspx describes how interpolated strings can be implicitly cast to IFormattable and FormattableString, which gave me the idea.\r\n\r\nI haven't had a chance to dive deep into the details about performance, but I found this interesting discussion: https://github.com/dotnet/roslyn/issues/518\r\n\r\nI leave it to you to judge if it's a good idea, but I couldn't find any mention of IFormattable or FormattableString here, and felt there should at least be an issue discussing it :)"},"comment":{"url":"https://api.github.com/repos/NLog/NLog/issues/comments/241002162","html_url":"https://github.com/NLog/NLog/issues/825#issuecomment-241002162","issue_url":"https://api.github.com/repos/NLog/NLog/issues/825","id":241002162,"user":{"login":"robert-j-engdahl","id":3032236,"avatar_url":"https://avatars.githubusercontent.com/u/3032236?v=3","gravatar_id":"","url":"https://api.github.com/users/robert-j-engdahl","html_url":"https://github.com/robert-j-engdahl","followers_url":"https://api.github.com/users/robert-j-engdahl/followers","following_url":"https://api.github.com/users/robert-j-engdahl/following{/other_user}","gists_url":"https://api.github.com/users/robert-j-engdahl/gists{/gist_id}","starred_url":"https://api.github.com/users/robert-j-engdahl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robert-j-engdahl/subscriptions","organizations_url":"https://api.github.com/users/robert-j-engdahl/orgs","repos_url":"https://api.github.com/users/robert-j-engdahl/repos","events_url":"https://api.github.com/users/robert-j-engdahl/events{/privacy}","received_events_url":"https://api.github.com/users/robert-j-engdahl/received_events","type":"User","site_admin":false},"created_at":"2016-08-19T12:11:56Z","updated_at":"2016-08-19T12:11:56Z","body":"binary backwards compatibility might be possible with a private string overload, but overloads with different accesslevels might be a can of worms.\r\n\r\nAnyway, it is not really an issue, everone can just wrap your interface with their own supporting the FormattableString overload."}}
{"actor":{"display_login":"robert-j-engdahl"}}