{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/orleans/pulls/comments/137134919","pull_request_review_id":60763295,"id":137134919,"diff_hunk":"@@ -0,0 +1,73 @@\n+﻿using Microsoft.Extensions.Logging;\n+using Orleans.Runtime;\n+using System;\n+using System.Collections.Generic;\n+using System.Net;\n+\n+namespace Orleans.Extensions.Logging\n+{\n+    public static class OrleansLoggingFactoryExtension\n+    {\n+        /// <summary>\n+        /// Add message bulking feature onto <param name=\"provider\"></param>, and add that new logger provider \n+        /// <see cref=\"MessageBulkingLoggerProvider{TDecoratedLoggerProvider}\"/> into <param name=\"builder\"></param>.\n+        /// </summary>\n+        /// <param name=\"builder\"></param>\n+        /// <param name=\"provider\"></param>\n+        /// <param name=\"messageBulkingConfig\"></param>\n+        /// <returns></returns>\n+        public static ILoggingBuilder AddMesageBulkingLoggerProvider<TDecoratedLoggerProvider>(this ILoggingBuilder builder, TDecoratedLoggerProvider provider, MessageBulkingConfig messageBulkingConfig)\n+            where TDecoratedLoggerProvider : ILoggerProvider\n+        {\n+            builder.AddProvider(new MessageBulkingLoggerProvider<TDecoratedLoggerProvider>(provider, messageBulkingConfig));\n+            return builder;\n+        }\n+\n+        /// <summary>\n+        /// Add <see cref=\"OrleansLoggerProvider\"> with message bulking feature to LoggerFactory\n+        /// </summary>\n+        /// <param name=\"builder\"></param>\n+        /// <param name=\"logConsumers\">log consumers which user want to write log events to</param>\n+        /// <param name=\"messageBulkingConfig\">config for message bulking feature</param>\n+        /// <returns></returns>\n+        [Obsolete]\n+        public static ILoggingBuilder AddOrleansLogging(\n+            this ILoggingBuilder builder,\n+            List<ILogConsumer> logConsumers,\n+            IPEndPoint ipEndPoint = null,","path":"src/OrleansLoggerProvider/OrleansLoggingFactoryExtension.cs","position":37,"original_position":37,"commit_id":"9a2f39011f506e0ea4a2540a54ed8bf4ddd4fcf4","original_commit_id":"9a2f39011f506e0ea4a2540a54ed8bf4ddd4fcf4","user":{"login":"xiazen","id":20803801,"avatar_url":"https://avatars3.githubusercontent.com/u/20803801?v=4","gravatar_id":"","url":"https://api.github.com/users/xiazen","html_url":"https://github.com/xiazen","followers_url":"https://api.github.com/users/xiazen/followers","following_url":"https://api.github.com/users/xiazen/following{/other_user}","gists_url":"https://api.github.com/users/xiazen/gists{/gist_id}","starred_url":"https://api.github.com/users/xiazen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiazen/subscriptions","organizations_url":"https://api.github.com/users/xiazen/orgs","repos_url":"https://api.github.com/users/xiazen/repos","events_url":"https://api.github.com/users/xiazen/events{/privacy}","received_events_url":"https://api.github.com/users/xiazen/received_events","type":"User","site_admin":false},"body":"we can discuss this in another PR. But IMO, this extensions should be decoupled with core interface as much as possible, since it is being deprecated. I see we provide convenience for users on how to resolve IpEndpoint using extenion method on ISiloBuilder, but at the mean time, we also couple those two closer than before, event it is just an extension method. I'm not concerned about resolving ipEndpoint, since it is pretty easy for user to resolve it as in they are the ones who configure that,. ","created_at":"2017-09-05T22:53:23Z","updated_at":"2017-09-05T22:53:23Z","html_url":"https://github.com/dotnet/orleans/pull/3284#discussion_r137134919","pull_request_url":"https://api.github.com/repos/dotnet/orleans/pulls/3284","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/comments/137134919"},"html":{"href":"https://github.com/dotnet/orleans/pull/3284#discussion_r137134919"},"pull_request":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/3284"}},"in_reply_to_id":137121271},"pull_request":{"url":"https://api.github.com/repos/dotnet/orleans/pulls/3284","id":134794533,"html_url":"https://github.com/dotnet/orleans/pull/3284","diff_url":"https://github.com/dotnet/orleans/pull/3284.diff","patch_url":"https://github.com/dotnet/orleans/pull/3284.patch","issue_url":"https://api.github.com/repos/dotnet/orleans/issues/3284","number":3284,"state":"open","locked":false,"title":"OrleansLogger and OrleansLoggerProvider","user":{"login":"xiazen","id":20803801,"avatar_url":"https://avatars3.githubusercontent.com/u/20803801?v=4","gravatar_id":"","url":"https://api.github.com/users/xiazen","html_url":"https://github.com/xiazen","followers_url":"https://api.github.com/users/xiazen/followers","following_url":"https://api.github.com/users/xiazen/following{/other_user}","gists_url":"https://api.github.com/users/xiazen/gists{/gist_id}","starred_url":"https://api.github.com/users/xiazen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiazen/subscriptions","organizations_url":"https://api.github.com/users/xiazen/orgs","repos_url":"https://api.github.com/users/xiazen/repos","events_url":"https://api.github.com/users/xiazen/events{/privacy}","received_events_url":"https://api.github.com/users/xiazen/received_events","type":"User","site_admin":false},"body":"Added `OrleansLogger `and `OlreansLoggerProvider` to preserve legacy Orleans logging features and configuration style, including\r\n\r\n- Message Bulking, including its configuration\r\n- `ILogConsumer`, `IClosableLogConsumer`, `IFlushableLogConsumer`, including its configuration\r\n- per category Severity Overrides, whose configuration style preserves old severity config style\r\n\r\nAdded OrleansLoggerExtension methods to preserve old Orleans logging methods. \r\n\r\nWired asp.net logging abstraction into silo's DI container, with OrleansLoggerProvider as default logger provider, LogFileConsumer as default ILogConsumer. One can now configure his LogFactory into DI, one can also create ILogger<T> from DI now. See tests as example.\r\n\r\n`OrleansLoggerProvider` supports\r\n- Create `new OrleansLoggingDecorator(bulkingConfig, OrleansLogger logger)`\r\n- Configure LogConsumers\r\n- Configure Severity overrides\r\n- Configure message bulking\r\n\r\n`OrleansLoggingDecorator` \r\n- a decorator class which user can plug in their ILogger and then gain message bulking feature on top of their ILogger\r\n\r\n`OrleansLogger` supports\r\n- log messages to configured LogConsumers\r\n- respects Severity overrides in `IsEnable(LogLevel level)` method\r\n- Map LogLevel to Severity\r\n\r\n`FileLogConsumer` is the replacement for FileTelemetryConsumer, which also preserves Orleans logging message format. Since general consensus I get is TelemetryConsumer should be replaced by asp.net built in log providers, or at least separate out from OrleansLogging. \r\n\r\n`ILogger `and `OlreansLoggerProvider` is supposed to replace `Logger`, `LogManager` eventually. OrleasnLogger is supposed to replace LoggerImpl. I haven't changed them  in this PR. So they work as is for now. \r\n\r\nAbout how `Microsoft.Extensions.Logging.LoggingFilter` and `OrleansLoggerSeverityOverrides` play together:\r\nOne can use either `Microsoft.Extensions.Logging.LoggingFilter` or `OrleansLoggerSeverityOverrides` to configure per logger Severity/LogLevel. Both config method works with `OrleansLogger`. If used together, think it as two layer of filters, need both filter being true for the end result to be true. \r\nSee tests to get a clearer idea\r\n\r\nEDIT:\r\n- TelemetryConsumers are not wired into OrleansLogging eco system. How it would play into the picture is unclear, since there's different opinion about it. Need to get back to that discussion.  **EDIT:** I have received general consensus that Telemetry will evolve to have its own system, which doesn't share infrastructure with logging. So remove this TODO from this PR. This will be resolved in its own path with its own series of PRs. \r\n- support logging scope. **EDIT: ** Can be done in a separate PR. It wasn't part of Orleans legacy logging feature. So merge this PR without this piece won't break anyone. But need to be added before 2.0\r\n- Move logging configuration to SiloBuilder. **EDIT:**  logging can be configured with DI. So I don't think there need to be extra config method on SiloBuilder for configuring logging. Although there can be that kind of config method on SiloBuilder, but I think it is out of scope of this PR. So remove this TODO from this PR. ","created_at":"2017-08-09T01:53:11Z","updated_at":"2017-09-05T22:53:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bf574144efcc86e91513f1b3e10aa089d4349214","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/orleans/pulls/3284/commits","review_comments_url":"https://api.github.com/repos/dotnet/orleans/pulls/3284/comments","review_comment_url":"https://api.github.com/repos/dotnet/orleans/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/orleans/issues/3284/comments","statuses_url":"https://api.github.com/repos/dotnet/orleans/statuses/9a2f39011f506e0ea4a2540a54ed8bf4ddd4fcf4","head":{"label":"xiazen:asp-logging","ref":"asp-logging","sha":"9a2f39011f506e0ea4a2540a54ed8bf4ddd4fcf4","user":{"login":"xiazen","id":20803801,"avatar_url":"https://avatars3.githubusercontent.com/u/20803801?v=4","gravatar_id":"","url":"https://api.github.com/users/xiazen","html_url":"https://github.com/xiazen","followers_url":"https://api.github.com/users/xiazen/followers","following_url":"https://api.github.com/users/xiazen/following{/other_user}","gists_url":"https://api.github.com/users/xiazen/gists{/gist_id}","starred_url":"https://api.github.com/users/xiazen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiazen/subscriptions","organizations_url":"https://api.github.com/users/xiazen/orgs","repos_url":"https://api.github.com/users/xiazen/repos","events_url":"https://api.github.com/users/xiazen/events{/privacy}","received_events_url":"https://api.github.com/users/xiazen/received_events","type":"User","site_admin":false},"repo":{"id":66402876,"name":"orleans","full_name":"xiazen/orleans","owner":{"login":"xiazen","id":20803801,"avatar_url":"https://avatars3.githubusercontent.com/u/20803801?v=4","gravatar_id":"","url":"https://api.github.com/users/xiazen","html_url":"https://github.com/xiazen","followers_url":"https://api.github.com/users/xiazen/followers","following_url":"https://api.github.com/users/xiazen/following{/other_user}","gists_url":"https://api.github.com/users/xiazen/gists{/gist_id}","starred_url":"https://api.github.com/users/xiazen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiazen/subscriptions","organizations_url":"https://api.github.com/users/xiazen/orgs","repos_url":"https://api.github.com/users/xiazen/repos","events_url":"https://api.github.com/users/xiazen/events{/privacy}","received_events_url":"https://api.github.com/users/xiazen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xiazen/orleans","description":"Orleans - Distributed Virtual Actor Model","fork":true,"url":"https://api.github.com/repos/xiazen/orleans","forks_url":"https://api.github.com/repos/xiazen/orleans/forks","keys_url":"https://api.github.com/repos/xiazen/orleans/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xiazen/orleans/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xiazen/orleans/teams","hooks_url":"https://api.github.com/repos/xiazen/orleans/hooks","issue_events_url":"https://api.github.com/repos/xiazen/orleans/issues/events{/number}","events_url":"https://api.github.com/repos/xiazen/orleans/events","assignees_url":"https://api.github.com/repos/xiazen/orleans/assignees{/user}","branches_url":"https://api.github.com/repos/xiazen/orleans/branches{/branch}","tags_url":"https://api.github.com/repos/xiazen/orleans/tags","blobs_url":"https://api.github.com/repos/xiazen/orleans/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xiazen/orleans/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xiazen/orleans/git/refs{/sha}","trees_url":"https://api.github.com/repos/xiazen/orleans/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xiazen/orleans/statuses/{sha}","languages_url":"https://api.github.com/repos/xiazen/orleans/languages","stargazers_url":"https://api.github.com/repos/xiazen/orleans/stargazers","contributors_url":"https://api.github.com/repos/xiazen/orleans/contributors","subscribers_url":"https://api.github.com/repos/xiazen/orleans/subscribers","subscription_url":"https://api.github.com/repos/xiazen/orleans/subscription","commits_url":"https://api.github.com/repos/xiazen/orleans/commits{/sha}","git_commits_url":"https://api.github.com/repos/xiazen/orleans/git/commits{/sha}","comments_url":"https://api.github.com/repos/xiazen/orleans/comments{/number}","issue_comment_url":"https://api.github.com/repos/xiazen/orleans/issues/comments{/number}","contents_url":"https://api.github.com/repos/xiazen/orleans/contents/{+path}","compare_url":"https://api.github.com/repos/xiazen/orleans/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xiazen/orleans/merges","archive_url":"https://api.github.com/repos/xiazen/orleans/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xiazen/orleans/downloads","issues_url":"https://api.github.com/repos/xiazen/orleans/issues{/number}","pulls_url":"https://api.github.com/repos/xiazen/orleans/pulls{/number}","milestones_url":"https://api.github.com/repos/xiazen/orleans/milestones{/number}","notifications_url":"https://api.github.com/repos/xiazen/orleans/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xiazen/orleans/labels{/name}","releases_url":"https://api.github.com/repos/xiazen/orleans/releases{/id}","deployments_url":"https://api.github.com/repos/xiazen/orleans/deployments","created_at":"2016-08-23T20:59:50Z","updated_at":"2016-11-03T01:51:16Z","pushed_at":"2017-09-05T18:43:29Z","git_url":"git://github.com/xiazen/orleans.git","ssh_url":"git@github.com:xiazen/orleans.git","clone_url":"https://github.com/xiazen/orleans.git","svn_url":"https://github.com/xiazen/orleans","homepage":"http://dotnet.github.io/orleans","size":19984,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"65b761d6e10c78cb2174b747f0ecf8be68339184","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":28232663,"name":"orleans","full_name":"dotnet/orleans","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/orleans","description":"Orleans - Distributed Virtual Actor Model","fork":false,"url":"https://api.github.com/repos/dotnet/orleans","forks_url":"https://api.github.com/repos/dotnet/orleans/forks","keys_url":"https://api.github.com/repos/dotnet/orleans/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/orleans/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/orleans/teams","hooks_url":"https://api.github.com/repos/dotnet/orleans/hooks","issue_events_url":"https://api.github.com/repos/dotnet/orleans/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/orleans/events","assignees_url":"https://api.github.com/repos/dotnet/orleans/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/orleans/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/orleans/tags","blobs_url":"https://api.github.com/repos/dotnet/orleans/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/orleans/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/orleans/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/orleans/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/orleans/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/orleans/languages","stargazers_url":"https://api.github.com/repos/dotnet/orleans/stargazers","contributors_url":"https://api.github.com/repos/dotnet/orleans/contributors","subscribers_url":"https://api.github.com/repos/dotnet/orleans/subscribers","subscription_url":"https://api.github.com/repos/dotnet/orleans/subscription","commits_url":"https://api.github.com/repos/dotnet/orleans/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/orleans/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/orleans/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/orleans/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/orleans/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/orleans/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/orleans/merges","archive_url":"https://api.github.com/repos/dotnet/orleans/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/orleans/downloads","issues_url":"https://api.github.com/repos/dotnet/orleans/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/orleans/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/orleans/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/orleans/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/orleans/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/orleans/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/orleans/deployments","created_at":"2014-12-19T14:32:50Z","updated_at":"2017-09-05T16:40:17Z","pushed_at":"2017-09-05T22:04:22Z","git_url":"git://github.com/dotnet/orleans.git","ssh_url":"git@github.com:dotnet/orleans.git","clone_url":"https://github.com/dotnet/orleans.git","svn_url":"https://github.com/dotnet/orleans","homepage":"http://dotnet.github.io/orleans","size":40307,"stargazers_count":3074,"watchers_count":3074,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":763,"mirror_url":null,"open_issues_count":308,"forks":763,"open_issues":308,"watchers":3074,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/3284"},"html":{"href":"https://github.com/dotnet/orleans/pull/3284"},"issue":{"href":"https://api.github.com/repos/dotnet/orleans/issues/3284"},"comments":{"href":"https://api.github.com/repos/dotnet/orleans/issues/3284/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/3284/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/3284/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/orleans/statuses/9a2f39011f506e0ea4a2540a54ed8bf4ddd4fcf4"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"xiazen"}}