{"action":"created","comment":{"url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/pulls/comments/46111038","id":46111038,"diff_hunk":"@@ -407,5 +657,41 @@ private void SendTheMessageToRichTextBox(string logMessage, RichTextBoxRowColori\n                 textBox.ScrollToCaret();\n             }\n         }\n+\n+        /// <summary>\n+        /// Stores a new message in internal queue, if it exists. Removes overflowing messages.\n+        /// </summary>\n+        /// <param name=\"logMessage\">a message to store</param>\n+        /// <param name=\"rule\">a corresponding coloring rule</param>\n+        private void StoreMessage(string logMessage, RichTextBoxRowColoringRule rule)\n+        {\n+            lock (messageQueueLock)\n+            {\n+                if (messageQueue == null)\n+                {\n+                    return;\n+                }\n+                if (MaxLines > 0)\n+                {\n+                    while (messageQueue.Count >= MaxLines)\n+                    {\n+                        messageQueue.Dequeue();\n+                    }\n+                }\n+                messageQueue.Enqueue(new MessageInfo(logMessage, rule));\n+            }\n+        }\n+\n+        private class MessageInfo\n+        {\n+            internal readonly string message;","path":"NLog.Windows.Forms/RichTextBoxTarget.cs","position":440,"original_position":440,"commit_id":"7b0b1eb044d48c68350b9047eec97d1afd0b8224","original_commit_id":"7b0b1eb044d48c68350b9047eec97d1afd0b8224","user":{"login":"mikhail-barg","id":2208971,"avatar_url":"https://avatars.githubusercontent.com/u/2208971?v=3","gravatar_id":"","url":"https://api.github.com/users/mikhail-barg","html_url":"https://github.com/mikhail-barg","followers_url":"https://api.github.com/users/mikhail-barg/followers","following_url":"https://api.github.com/users/mikhail-barg/following{/other_user}","gists_url":"https://api.github.com/users/mikhail-barg/gists{/gist_id}","starred_url":"https://api.github.com/users/mikhail-barg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikhail-barg/subscriptions","organizations_url":"https://api.github.com/users/mikhail-barg/orgs","repos_url":"https://api.github.com/users/mikhail-barg/repos","events_url":"https://api.github.com/users/mikhail-barg/events{/privacy}","received_events_url":"https://api.github.com/users/mikhail-barg/received_events","type":"User","site_admin":false},"body":"We have hearty discussion on this matter in our company, and I'm giving in to using fields ). Fixed.","created_at":"2015-11-30T06:05:41Z","updated_at":"2015-11-30T06:05:41Z","html_url":"https://github.com/NLog/NLog.Windows.Forms/pull/9#discussion_r46111038","pull_request_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/NLog/NLog.Windows.Forms/pulls/comments/46111038"},"html":{"href":"https://github.com/NLog/NLog.Windows.Forms/pull/9#discussion_r46111038"},"pull_request":{"href":"https://api.github.com/repos/NLog/NLog.Windows.Forms/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/pulls/9","id":44033739,"html_url":"https://github.com/NLog/NLog.Windows.Forms/pull/9","diff_url":"https://github.com/NLog/NLog.Windows.Forms/pull/9.diff","patch_url":"https://github.com/NLog/NLog.Windows.Forms/pull/9.patch","issue_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/issues/9","number":9,"state":"open","locked":false,"title":"Proposed solution for dynamic RichTextBoxes attachment","user":{"login":"mikhail-barg","id":2208971,"avatar_url":"https://avatars.githubusercontent.com/u/2208971?v=3","gravatar_id":"","url":"https://api.github.com/users/mikhail-barg","html_url":"https://github.com/mikhail-barg","followers_url":"https://api.github.com/users/mikhail-barg/followers","following_url":"https://api.github.com/users/mikhail-barg/following{/other_user}","gists_url":"https://api.github.com/users/mikhail-barg/gists{/gist_id}","starred_url":"https://api.github.com/users/mikhail-barg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikhail-barg/subscriptions","organizations_url":"https://api.github.com/users/mikhail-barg/orgs","repos_url":"https://api.github.com/users/mikhail-barg/repos","events_url":"https://api.github.com/users/mikhail-barg/events{/privacy}","received_events_url":"https://api.github.com/users/mikhail-barg/received_events","type":"User","site_admin":false},"body":"As discussed in https://github.com/NLog/NLog.Windows.Forms/issues/6 and https://github.com/NLog/NLog/issues/133","created_at":"2015-09-02T19:44:37Z","updated_at":"2015-11-30T06:05:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3787d48f19ea14f538af495779ade2ff9b0acf73","assignee":{"login":"304NotModified","id":5808377,"avatar_url":"https://avatars.githubusercontent.com/u/5808377?v=3","gravatar_id":"","url":"https://api.github.com/users/304NotModified","html_url":"https://github.com/304NotModified","followers_url":"https://api.github.com/users/304NotModified/followers","following_url":"https://api.github.com/users/304NotModified/following{/other_user}","gists_url":"https://api.github.com/users/304NotModified/gists{/gist_id}","starred_url":"https://api.github.com/users/304NotModified/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/304NotModified/subscriptions","organizations_url":"https://api.github.com/users/304NotModified/orgs","repos_url":"https://api.github.com/users/304NotModified/repos","events_url":"https://api.github.com/users/304NotModified/events{/privacy}","received_events_url":"https://api.github.com/users/304NotModified/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/milestones/4","html_url":"https://github.com/NLog/NLog.Windows.Forms/milestones/4.1","labels_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/milestones/4/labels","id":1433555,"number":4,"title":"4.1","description":"","creator":{"login":"304NotModified","id":5808377,"avatar_url":"https://avatars.githubusercontent.com/u/5808377?v=3","gravatar_id":"","url":"https://api.github.com/users/304NotModified","html_url":"https://github.com/304NotModified","followers_url":"https://api.github.com/users/304NotModified/followers","following_url":"https://api.github.com/users/304NotModified/following{/other_user}","gists_url":"https://api.github.com/users/304NotModified/gists{/gist_id}","starred_url":"https://api.github.com/users/304NotModified/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/304NotModified/subscriptions","organizations_url":"https://api.github.com/users/304NotModified/orgs","repos_url":"https://api.github.com/users/304NotModified/repos","events_url":"https://api.github.com/users/304NotModified/events{/privacy}","received_events_url":"https://api.github.com/users/304NotModified/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2015-11-28T21:21:04Z","updated_at":"2015-11-28T21:21:38Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/pulls/9/commits","review_comments_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/pulls/9/comments","review_comment_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/issues/9/comments","statuses_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/statuses/7b0b1eb044d48c68350b9047eec97d1afd0b8224","head":{"label":"mikhail-barg:master","ref":"master","sha":"7b0b1eb044d48c68350b9047eec97d1afd0b8224","user":{"login":"mikhail-barg","id":2208971,"avatar_url":"https://avatars.githubusercontent.com/u/2208971?v=3","gravatar_id":"","url":"https://api.github.com/users/mikhail-barg","html_url":"https://github.com/mikhail-barg","followers_url":"https://api.github.com/users/mikhail-barg/followers","following_url":"https://api.github.com/users/mikhail-barg/following{/other_user}","gists_url":"https://api.github.com/users/mikhail-barg/gists{/gist_id}","starred_url":"https://api.github.com/users/mikhail-barg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikhail-barg/subscriptions","organizations_url":"https://api.github.com/users/mikhail-barg/orgs","repos_url":"https://api.github.com/users/mikhail-barg/repos","events_url":"https://api.github.com/users/mikhail-barg/events{/privacy}","received_events_url":"https://api.github.com/users/mikhail-barg/received_events","type":"User","site_admin":false},"repo":{"id":41765834,"name":"NLog.Windows.Forms","full_name":"mikhail-barg/NLog.Windows.Forms","owner":{"login":"mikhail-barg","id":2208971,"avatar_url":"https://avatars.githubusercontent.com/u/2208971?v=3","gravatar_id":"","url":"https://api.github.com/users/mikhail-barg","html_url":"https://github.com/mikhail-barg","followers_url":"https://api.github.com/users/mikhail-barg/followers","following_url":"https://api.github.com/users/mikhail-barg/following{/other_user}","gists_url":"https://api.github.com/users/mikhail-barg/gists{/gist_id}","starred_url":"https://api.github.com/users/mikhail-barg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikhail-barg/subscriptions","organizations_url":"https://api.github.com/users/mikhail-barg/orgs","repos_url":"https://api.github.com/users/mikhail-barg/repos","events_url":"https://api.github.com/users/mikhail-barg/events{/privacy}","received_events_url":"https://api.github.com/users/mikhail-barg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mikhail-barg/NLog.Windows.Forms","description":"NLog targets specific for Windows.Forms","fork":true,"url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms","forks_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/forks","keys_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/teams","hooks_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/hooks","issue_events_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/issues/events{/number}","events_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/events","assignees_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/assignees{/user}","branches_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/branches{/branch}","tags_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/tags","blobs_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/statuses/{sha}","languages_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/languages","stargazers_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/stargazers","contributors_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/contributors","subscribers_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/subscribers","subscription_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/subscription","commits_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/issues/comments{/number}","contents_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/contents/{+path}","compare_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/merges","archive_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/downloads","issues_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/issues{/number}","pulls_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/pulls{/number}","milestones_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/milestones{/number}","notifications_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/labels{/name}","releases_url":"https://api.github.com/repos/mikhail-barg/NLog.Windows.Forms/releases{/id}","created_at":"2015-09-01T22:05:59Z","updated_at":"2015-09-01T22:06:00Z","pushed_at":"2015-11-23T05:59:08Z","git_url":"git://github.com/mikhail-barg/NLog.Windows.Forms.git","ssh_url":"git@github.com:mikhail-barg/NLog.Windows.Forms.git","clone_url":"https://github.com/mikhail-barg/NLog.Windows.Forms.git","svn_url":"https://github.com/mikhail-barg/NLog.Windows.Forms","homepage":null,"size":130,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"NLog:master","ref":"master","sha":"2e09b2e7c24ae8bff3e732e1ed8382ded664e9b9","user":{"login":"NLog","id":2331628,"avatar_url":"https://avatars.githubusercontent.com/u/2331628?v=3","gravatar_id":"","url":"https://api.github.com/users/NLog","html_url":"https://github.com/NLog","followers_url":"https://api.github.com/users/NLog/followers","following_url":"https://api.github.com/users/NLog/following{/other_user}","gists_url":"https://api.github.com/users/NLog/gists{/gist_id}","starred_url":"https://api.github.com/users/NLog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NLog/subscriptions","organizations_url":"https://api.github.com/users/NLog/orgs","repos_url":"https://api.github.com/users/NLog/repos","events_url":"https://api.github.com/users/NLog/events{/privacy}","received_events_url":"https://api.github.com/users/NLog/received_events","type":"Organization","site_admin":false},"repo":{"id":29691030,"name":"NLog.Windows.Forms","full_name":"NLog/NLog.Windows.Forms","owner":{"login":"NLog","id":2331628,"avatar_url":"https://avatars.githubusercontent.com/u/2331628?v=3","gravatar_id":"","url":"https://api.github.com/users/NLog","html_url":"https://github.com/NLog","followers_url":"https://api.github.com/users/NLog/followers","following_url":"https://api.github.com/users/NLog/following{/other_user}","gists_url":"https://api.github.com/users/NLog/gists{/gist_id}","starred_url":"https://api.github.com/users/NLog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NLog/subscriptions","organizations_url":"https://api.github.com/users/NLog/orgs","repos_url":"https://api.github.com/users/NLog/repos","events_url":"https://api.github.com/users/NLog/events{/privacy}","received_events_url":"https://api.github.com/users/NLog/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NLog/NLog.Windows.Forms","description":"NLog targets specific for Windows.Forms","fork":false,"url":"https://api.github.com/repos/NLog/NLog.Windows.Forms","forks_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/forks","keys_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/teams","hooks_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/hooks","issue_events_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/issues/events{/number}","events_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/events","assignees_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/assignees{/user}","branches_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/branches{/branch}","tags_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/tags","blobs_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/git/refs{/sha}","trees_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/statuses/{sha}","languages_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/languages","stargazers_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/stargazers","contributors_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/contributors","subscribers_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/subscribers","subscription_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/subscription","commits_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/commits{/sha}","git_commits_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/git/commits{/sha}","comments_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/comments{/number}","issue_comment_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/issues/comments{/number}","contents_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/contents/{+path}","compare_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/merges","archive_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/downloads","issues_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/issues{/number}","pulls_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/pulls{/number}","milestones_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/milestones{/number}","notifications_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/labels{/name}","releases_url":"https://api.github.com/repos/NLog/NLog.Windows.Forms/releases{/id}","created_at":"2015-01-22T17:35:59Z","updated_at":"2015-09-02T21:45:44Z","pushed_at":"2015-11-23T05:59:08Z","git_url":"git://github.com/NLog/NLog.Windows.Forms.git","ssh_url":"git@github.com:NLog/NLog.Windows.Forms.git","clone_url":"https://github.com/NLog/NLog.Windows.Forms.git","svn_url":"https://github.com/NLog/NLog.Windows.Forms","homepage":null,"size":733,"stargazers_count":2,"watchers_count":2,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":3,"forks":5,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NLog/NLog.Windows.Forms/pulls/9"},"html":{"href":"https://github.com/NLog/NLog.Windows.Forms/pull/9"},"issue":{"href":"https://api.github.com/repos/NLog/NLog.Windows.Forms/issues/9"},"comments":{"href":"https://api.github.com/repos/NLog/NLog.Windows.Forms/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/NLog/NLog.Windows.Forms/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/NLog/NLog.Windows.Forms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NLog/NLog.Windows.Forms/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/NLog/NLog.Windows.Forms/statuses/7b0b1eb044d48c68350b9047eec97d1afd0b8224"}}}}