{"action":"closed","number":815,"pull_request":{"url":"https://api.github.com/repos/NLog/NLog/pulls/815","id":40842730,"html_url":"https://github.com/NLog/NLog/pull/815","diff_url":"https://github.com/NLog/NLog/pull/815.diff","patch_url":"https://github.com/NLog/NLog/pull/815.patch","issue_url":"https://api.github.com/repos/NLog/NLog/issues/815","number":815,"state":"closed","locked":false,"title":"Overhaul variables [wip]","user":{"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},"body":"In the past we could not change the value of a variable, because the variable was rendered while parsing the XML - the old value was lost. (issue #694.). Also, we could not use variables from the API, which was a bit strange.\r\n\r\nBoth are now fixed, by doing things differently:\r\n- variables can we now  rendered by a layout renderer (`${var:username} `instead of `${username}`)\r\n- the variables can we still set from the XML config, with the same syntax. (e.g.    `<variable name='username' value='admin' />`\r\n- the \"old\" variables \r\n\r\n\r\nPlease not:\r\n- The XML is fully backwards-compatible.\r\n- The API isn't, the Variables in config has been changed from `Dictionary<string, string>` to `IDictionary<string, Layout>`. This can not be prevented, without tricks or re-parse every Layout every time.\r\n- This new style won't replace fully the old variables, as I can only be used in Layouts.\r\n- Also the `ToString()` of `Layout`/`SimpleLayout` has been changed. It now returns the original value (before parse). Before it printed the Text in quotes. This was also odd behaviour (because `(Layout) (layout.ToString) == layout`)  (#709)\r\n \r\n\r\n \r\n\r\n- variables are now Layouts\r\n- included new layout rendererer: VariableRenderer\r\n- this will make it easy to change the value of variable on runtime or even remove it\r\n- VariableRenderer has name and default (if not set)\r\n\r\nfixed #694.","created_at":"2015-07-25T20:26:40Z","updated_at":"2015-07-25T21:01:54Z","closed_at":"2015-07-25T21:01:54Z","merged_at":null,"merge_commit_sha":"2de8fe08638c9940df84323efaefe3329f6b9ac7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/NLog/NLog/pulls/815/commits","review_comments_url":"https://api.github.com/repos/NLog/NLog/pulls/815/comments","review_comment_url":"https://api.github.com/repos/NLog/NLog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NLog/NLog/issues/815/comments","statuses_url":"https://api.github.com/repos/NLog/NLog/statuses/924e6ff677ad503b7b58b566c2905ba0b72e0ab7","head":{"label":"304NotModified:overhaul-vars","ref":"overhaul-vars","sha":"924e6ff677ad503b7b58b566c2905ba0b72e0ab7","user":{"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},"repo":{"id":29777920,"name":"NLog","full_name":"304NotModified/NLog","owner":{"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},"private":false,"html_url":"https://github.com/304NotModified/NLog","description":"NLog - Advanced .NET and Silverlight Logging","fork":true,"url":"https://api.github.com/repos/304NotModified/NLog","forks_url":"https://api.github.com/repos/304NotModified/NLog/forks","keys_url":"https://api.github.com/repos/304NotModified/NLog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/304NotModified/NLog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/304NotModified/NLog/teams","hooks_url":"https://api.github.com/repos/304NotModified/NLog/hooks","issue_events_url":"https://api.github.com/repos/304NotModified/NLog/issues/events{/number}","events_url":"https://api.github.com/repos/304NotModified/NLog/events","assignees_url":"https://api.github.com/repos/304NotModified/NLog/assignees{/user}","branches_url":"https://api.github.com/repos/304NotModified/NLog/branches{/branch}","tags_url":"https://api.github.com/repos/304NotModified/NLog/tags","blobs_url":"https://api.github.com/repos/304NotModified/NLog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/304NotModified/NLog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/304NotModified/NLog/git/refs{/sha}","trees_url":"https://api.github.com/repos/304NotModified/NLog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/304NotModified/NLog/statuses/{sha}","languages_url":"https://api.github.com/repos/304NotModified/NLog/languages","stargazers_url":"https://api.github.com/repos/304NotModified/NLog/stargazers","contributors_url":"https://api.github.com/repos/304NotModified/NLog/contributors","subscribers_url":"https://api.github.com/repos/304NotModified/NLog/subscribers","subscription_url":"https://api.github.com/repos/304NotModified/NLog/subscription","commits_url":"https://api.github.com/repos/304NotModified/NLog/commits{/sha}","git_commits_url":"https://api.github.com/repos/304NotModified/NLog/git/commits{/sha}","comments_url":"https://api.github.com/repos/304NotModified/NLog/comments{/number}","issue_comment_url":"https://api.github.com/repos/304NotModified/NLog/issues/comments{/number}","contents_url":"https://api.github.com/repos/304NotModified/NLog/contents/{+path}","compare_url":"https://api.github.com/repos/304NotModified/NLog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/304NotModified/NLog/merges","archive_url":"https://api.github.com/repos/304NotModified/NLog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/304NotModified/NLog/downloads","issues_url":"https://api.github.com/repos/304NotModified/NLog/issues{/number}","pulls_url":"https://api.github.com/repos/304NotModified/NLog/pulls{/number}","milestones_url":"https://api.github.com/repos/304NotModified/NLog/milestones{/number}","notifications_url":"https://api.github.com/repos/304NotModified/NLog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/304NotModified/NLog/labels{/name}","releases_url":"https://api.github.com/repos/304NotModified/NLog/releases{/id}","created_at":"2015-01-24T13:49:30Z","updated_at":"2015-05-06T20:29:51Z","pushed_at":"2015-07-25T20:58:16Z","git_url":"git://github.com/304NotModified/NLog.git","ssh_url":"git@github.com:304NotModified/NLog.git","clone_url":"https://github.com/304NotModified/NLog.git","svn_url":"https://github.com/304NotModified/NLog","homepage":null,"size":47255,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"new-master2"}},"base":{"label":"NLog:master","ref":"master","sha":"f607920ee7fff34ef8656e057c156136e305414f","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":5780416,"name":"NLog","full_name":"NLog/NLog","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","description":"NLog - Advanced .NET and Silverlight Logging","fork":false,"url":"https://api.github.com/repos/NLog/NLog","forks_url":"https://api.github.com/repos/NLog/NLog/forks","keys_url":"https://api.github.com/repos/NLog/NLog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NLog/NLog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NLog/NLog/teams","hooks_url":"https://api.github.com/repos/NLog/NLog/hooks","issue_events_url":"https://api.github.com/repos/NLog/NLog/issues/events{/number}","events_url":"https://api.github.com/repos/NLog/NLog/events","assignees_url":"https://api.github.com/repos/NLog/NLog/assignees{/user}","branches_url":"https://api.github.com/repos/NLog/NLog/branches{/branch}","tags_url":"https://api.github.com/repos/NLog/NLog/tags","blobs_url":"https://api.github.com/repos/NLog/NLog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NLog/NLog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NLog/NLog/git/refs{/sha}","trees_url":"https://api.github.com/repos/NLog/NLog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NLog/NLog/statuses/{sha}","languages_url":"https://api.github.com/repos/NLog/NLog/languages","stargazers_url":"https://api.github.com/repos/NLog/NLog/stargazers","contributors_url":"https://api.github.com/repos/NLog/NLog/contributors","subscribers_url":"https://api.github.com/repos/NLog/NLog/subscribers","subscription_url":"https://api.github.com/repos/NLog/NLog/subscription","commits_url":"https://api.github.com/repos/NLog/NLog/commits{/sha}","git_commits_url":"https://api.github.com/repos/NLog/NLog/git/commits{/sha}","comments_url":"https://api.github.com/repos/NLog/NLog/comments{/number}","issue_comment_url":"https://api.github.com/repos/NLog/NLog/issues/comments{/number}","contents_url":"https://api.github.com/repos/NLog/NLog/contents/{+path}","compare_url":"https://api.github.com/repos/NLog/NLog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NLog/NLog/merges","archive_url":"https://api.github.com/repos/NLog/NLog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NLog/NLog/downloads","issues_url":"https://api.github.com/repos/NLog/NLog/issues{/number}","pulls_url":"https://api.github.com/repos/NLog/NLog/pulls{/number}","milestones_url":"https://api.github.com/repos/NLog/NLog/milestones{/number}","notifications_url":"https://api.github.com/repos/NLog/NLog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NLog/NLog/labels{/name}","releases_url":"https://api.github.com/repos/NLog/NLog/releases{/id}","created_at":"2012-09-12T13:49:29Z","updated_at":"2015-07-23T17:53:24Z","pushed_at":"2015-07-25T20:47:21Z","git_url":"git://github.com/NLog/NLog.git","ssh_url":"git@github.com:NLog/NLog.git","clone_url":"https://github.com/NLog/NLog.git","svn_url":"https://github.com/NLog/NLog","homepage":null,"size":58001,"stargazers_count":1112,"watchers_count":1112,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":414,"mirror_url":null,"open_issues_count":96,"forks":414,"open_issues":96,"watchers":1112,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NLog/NLog/pulls/815"},"html":{"href":"https://github.com/NLog/NLog/pull/815"},"issue":{"href":"https://api.github.com/repos/NLog/NLog/issues/815"},"comments":{"href":"https://api.github.com/repos/NLog/NLog/issues/815/comments"},"review_comments":{"href":"https://api.github.com/repos/NLog/NLog/pulls/815/comments"},"review_comment":{"href":"https://api.github.com/repos/NLog/NLog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NLog/NLog/pulls/815/commits"},"statuses":{"href":"https://api.github.com/repos/NLog/NLog/statuses/924e6ff677ad503b7b58b566c2905ba0b72e0ab7"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":1,"review_comments":0,"commits":9,"additions":415,"deletions":61,"changed_files":21}}