{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/comments/56074899","id":56074899,"diff_hunk":"@@ -36,12 +56,54 @@ public override void Initialize(IHostContext hostContext)\n         //\n         public void Write(string message)\n         {\n-            if (TimeLineId == Guid.Empty)\n+            ArgUtil.NotEmpty(_timelineId, nameof(_timelineId));\n+\n+            // lazy creation on write\n+            if (_pageWriter == null)\n+            {\n+                Create();\n+            }\n+\n+            _pageWriter.WriteLine($\"{DateTime.UtcNow.ToString(\"O\")} {message}\");\n+\n+            // TODO: split lines - line count not completely accurate","path":"src/Microsoft.VisualStudio.Services.Agent/Logging.cs","position":80,"original_position":80,"commit_id":"a507e5cf33ff5e1c7bf5c6d59b73e2337a28c42e","original_commit_id":"a507e5cf33ff5e1c7bf5c6d59b73e2337a28c42e","user":{"login":"TingluoHuang","id":1750815,"avatar_url":"https://avatars.githubusercontent.com/u/1750815?v=3","gravatar_id":"","url":"https://api.github.com/users/TingluoHuang","html_url":"https://github.com/TingluoHuang","followers_url":"https://api.github.com/users/TingluoHuang/followers","following_url":"https://api.github.com/users/TingluoHuang/following{/other_user}","gists_url":"https://api.github.com/users/TingluoHuang/gists{/gist_id}","starred_url":"https://api.github.com/users/TingluoHuang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TingluoHuang/subscriptions","organizations_url":"https://api.github.com/users/TingluoHuang/orgs","repos_url":"https://api.github.com/users/TingluoHuang/repos","events_url":"https://api.github.com/users/TingluoHuang/events{/privacy}","received_events_url":"https://api.github.com/users/TingluoHuang/received_events","type":"User","site_admin":false},"body":"move this TODO to the execution context.","created_at":"2016-03-14T20:59:41Z","updated_at":"2016-03-14T20:59:41Z","html_url":"https://github.com/Microsoft/vsts-agent/pull/16#discussion_r56074899","pull_request_url":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/comments/56074899"},"html":{"href":"https://github.com/Microsoft/vsts-agent/pull/16#discussion_r56074899"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/16","id":62803133,"html_url":"https://github.com/Microsoft/vsts-agent/pull/16","diff_url":"https://github.com/Microsoft/vsts-agent/pull/16.diff","patch_url":"https://github.com/Microsoft/vsts-agent/pull/16.patch","issue_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/16","number":16,"state":"open","locked":false,"title":"Implement PageLogger, hook it into the ExecutionContext and write tests","user":{"login":"stiliev","id":16541189,"avatar_url":"https://avatars.githubusercontent.com/u/16541189?v=3","gravatar_id":"","url":"https://api.github.com/users/stiliev","html_url":"https://github.com/stiliev","followers_url":"https://api.github.com/users/stiliev/followers","following_url":"https://api.github.com/users/stiliev/following{/other_user}","gists_url":"https://api.github.com/users/stiliev/gists{/gist_id}","starred_url":"https://api.github.com/users/stiliev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stiliev/subscriptions","organizations_url":"https://api.github.com/users/stiliev/orgs","repos_url":"https://api.github.com/users/stiliev/repos","events_url":"https://api.github.com/users/stiliev/events{/privacy}","received_events_url":"https://api.github.com/users/stiliev/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-14T19:24:34Z","updated_at":"2016-03-14T20:59:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eefe04cb78cdc1fbc70f98dd8f6fb37b4db327a2","assignee":{"login":"TingluoHuang","id":1750815,"avatar_url":"https://avatars.githubusercontent.com/u/1750815?v=3","gravatar_id":"","url":"https://api.github.com/users/TingluoHuang","html_url":"https://github.com/TingluoHuang","followers_url":"https://api.github.com/users/TingluoHuang/followers","following_url":"https://api.github.com/users/TingluoHuang/following{/other_user}","gists_url":"https://api.github.com/users/TingluoHuang/gists{/gist_id}","starred_url":"https://api.github.com/users/TingluoHuang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TingluoHuang/subscriptions","organizations_url":"https://api.github.com/users/TingluoHuang/orgs","repos_url":"https://api.github.com/users/TingluoHuang/repos","events_url":"https://api.github.com/users/TingluoHuang/events{/privacy}","received_events_url":"https://api.github.com/users/TingluoHuang/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/16/commits","review_comments_url":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/16/comments","review_comment_url":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/16/comments","statuses_url":"https://api.github.com/repos/Microsoft/vsts-agent/statuses/a507e5cf33ff5e1c7bf5c6d59b73e2337a28c42e","head":{"label":"Microsoft:users/stiliev/paginglogger","ref":"users/stiliev/paginglogger","sha":"a507e5cf33ff5e1c7bf5c6d59b73e2337a28c42e","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":53052789,"name":"vsts-agent","full_name":"Microsoft/vsts-agent","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/vsts-agent","description":"Visual Studio Team Services Build and Release Agent","fork":false,"url":"https://api.github.com/repos/Microsoft/vsts-agent","forks_url":"https://api.github.com/repos/Microsoft/vsts-agent/forks","keys_url":"https://api.github.com/repos/Microsoft/vsts-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vsts-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vsts-agent/teams","hooks_url":"https://api.github.com/repos/Microsoft/vsts-agent/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vsts-agent/events","assignees_url":"https://api.github.com/repos/Microsoft/vsts-agent/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vsts-agent/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vsts-agent/tags","blobs_url":"https://api.github.com/repos/Microsoft/vsts-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vsts-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vsts-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vsts-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vsts-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vsts-agent/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vsts-agent/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vsts-agent/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vsts-agent/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vsts-agent/subscription","commits_url":"https://api.github.com/repos/Microsoft/vsts-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vsts-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vsts-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vsts-agent/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vsts-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vsts-agent/merges","archive_url":"https://api.github.com/repos/Microsoft/vsts-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vsts-agent/downloads","issues_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vsts-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vsts-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vsts-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vsts-agent/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vsts-agent/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vsts-agent/deployments","created_at":"2016-03-03T13:36:48Z","updated_at":"2016-03-10T04:42:58Z","pushed_at":"2016-03-14T19:24:34Z","git_url":"git://github.com/Microsoft/vsts-agent.git","ssh_url":"git@github.com:Microsoft/vsts-agent.git","clone_url":"https://github.com/Microsoft/vsts-agent.git","svn_url":"https://github.com/Microsoft/vsts-agent","homepage":null,"size":407,"stargazers_count":2,"watchers_count":2,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":2,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"c97e86dbd2bfafd8989cb19f5cc8529e28c07173","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":53052789,"name":"vsts-agent","full_name":"Microsoft/vsts-agent","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/vsts-agent","description":"Visual Studio Team Services Build and Release Agent","fork":false,"url":"https://api.github.com/repos/Microsoft/vsts-agent","forks_url":"https://api.github.com/repos/Microsoft/vsts-agent/forks","keys_url":"https://api.github.com/repos/Microsoft/vsts-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vsts-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vsts-agent/teams","hooks_url":"https://api.github.com/repos/Microsoft/vsts-agent/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vsts-agent/events","assignees_url":"https://api.github.com/repos/Microsoft/vsts-agent/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vsts-agent/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vsts-agent/tags","blobs_url":"https://api.github.com/repos/Microsoft/vsts-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vsts-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vsts-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vsts-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vsts-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vsts-agent/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vsts-agent/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vsts-agent/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vsts-agent/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vsts-agent/subscription","commits_url":"https://api.github.com/repos/Microsoft/vsts-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vsts-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vsts-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vsts-agent/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vsts-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vsts-agent/merges","archive_url":"https://api.github.com/repos/Microsoft/vsts-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vsts-agent/downloads","issues_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vsts-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vsts-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vsts-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vsts-agent/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vsts-agent/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vsts-agent/deployments","created_at":"2016-03-03T13:36:48Z","updated_at":"2016-03-10T04:42:58Z","pushed_at":"2016-03-14T19:24:34Z","git_url":"git://github.com/Microsoft/vsts-agent.git","ssh_url":"git@github.com:Microsoft/vsts-agent.git","clone_url":"https://github.com/Microsoft/vsts-agent.git","svn_url":"https://github.com/Microsoft/vsts-agent","homepage":null,"size":407,"stargazers_count":2,"watchers_count":2,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/16"},"html":{"href":"https://github.com/Microsoft/vsts-agent/pull/16"},"issue":{"href":"https://api.github.com/repos/Microsoft/vsts-agent/issues/16"},"comments":{"href":"https://api.github.com/repos/Microsoft/vsts-agent/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/vsts-agent/statuses/a507e5cf33ff5e1c7bf5c6d59b73e2337a28c42e"}}}}