GitHub PullRequestReviewCommentEvent at 2014-11-19 21:08:00
Repository: Diagnostics
Actor: Eilon
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/Diagnostics/pulls/comments/20607609","id":20607609,"diff_hunk":"@@ -0,0 +1,183 @@\n+﻿@using System\n+@using System.Globalization\n+@using System.Linq\n+@using Microsoft.AspNet.Diagnostics.Elm.Views\n+@using Microsoft.Framework.Logging\n+@using Microsoft.AspNet.Diagnostics.Elm\n+@using Microsoft.AspNet.Diagnostics.Views\n+\n+@functions\n+{\n+    public LogPage(LogPageModel model)\n+    {\n+        Model = model;\n+    }\n+\n+    public LogPageModel Model { get; set; }\n+}\n+\n+@* writes one log row indented by the given level *@\n+@helper LogRow(LogInfo log, int level) {\n+    if (log.Severity >= Model.Options.MinLevel && \n+        (string.IsNullOrEmpty(Model.Options.NamePrefix) || log.Name.StartsWith(Model.Options.NamePrefix)))\n+    {\n+        <tr class=\"logRow\">\n+            <td>@string.Format(\"{0:MM/dd/yy}\", log.Time)</td>\n+            <td>@string.Format(\"{0:H:mm:ss}\", log.Time)</td>\n+            <td title=\"@log.Name\">@log.Name</td>\n+            <td class=\"@log.Severity.ToString().ToLowerInvariant()\">@log.Severity</td>\n+            <td title=\"@log.Message\">\n+                @for (var i = 0; i < level; i++)\n+                {\n+                    <span class=\"tab\"></span>\n+                }\n+                @log.Message\n+            </td>\n+            <td title=\"@log.Exception\">@log.Exception</td>\n+        </tr>\n+    }\n+}\n+\n+@helper Traverse(ScopeNode node, int level)\n+{\n+    // print start of scope\n+    @LogRow(new LogInfo()\n+    {\n+        Name = node.Name,\n+        Time = node.StartTime,\n+        Severity = LogLevel.Verbose,\n+        Message = \"Beginning \" + node.State,\n+    }, level);\n+    var messageIndex = 0;\n+    var childIndex = 0;\n+    while (messageIndex < node.Messages.Count && childIndex < node.Children.Count)\n+    {\n+        if (node.Messages[messageIndex].Time < node.Children[childIndex].StartTime)\n+        {\n+            @LogRow(node.Messages[messageIndex], level)\n+            messageIndex++;\n+        }\n+        else\n+        {\n+            @Traverse(node.Children[childIndex], level + 1)\n+            childIndex++;\n+        }\n+    }\n+    if (messageIndex < node.Messages.Count)\n+    {\n+        for (var i = messageIndex; i < node.Messages.Count; i++)\n+        {\n+            @LogRow(node.Messages[i], level)\n+        }\n+    }\n+    else\n+    {\n+        for (var i = childIndex; i < node.Children.Count; i++)\n+        {\n+            @Traverse(node.Children[i], level + 1)\n+        }\n+    }\n+    // print end of scope\n+    @LogRow(new LogInfo()\n+    {\n+        Name = node.Name,\n+        Time = node.EndTime,\n+        Severity = LogLevel.Verbose,\n+        Message = string.Format(\"Completed {0} in {1}ms\", node.State, node.EndTime - node.StartTime)\n+    }, level);\n+}\n+\n+<!DOCTYPE html>\n+<html>\n+<head>\n+    <meta charset=\"utf-8\" />\n+    <title>ELM</title>","path":"src/Microsoft.AspNet.Diagnostics.Elm/Views/LogPage.cshtml","position":94,"original_position":94,"commit_id":"241eb93b4f059867b4eb283ee5ef74b730934db0","original_commit_id":"241eb93b4f059867b4eb283ee5ef74b730934db0","user":{"login":"Eilon","id":202643,"avatar_url":"https://avatars.githubusercontent.com/u/202643?v=3","gravatar_id":"","url":"https://api.github.com/users/Eilon","html_url":"https://github.com/Eilon","followers_url":"https://api.github.com/users/Eilon/followers","following_url":"https://api.github.com/users/Eilon/following{/other_user}","gists_url":"https://api.github.com/users/Eilon/gists{/gist_id}","starred_url":"https://api.github.com/users/Eilon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eilon/subscriptions","organizations_url":"https://api.github.com/users/Eilon/orgs","repos_url":"https://api.github.com/users/Eilon/repos","events_url":"https://api.github.com/users/Eilon/events{/privacy}","received_events_url":"https://api.github.com/users/Eilon/received_events","type":"User","site_admin":false},"body":"Might want to have a more descriptive title.. and I don't mean just spelling out ELM. Like maybe \"ASP.NET Logs\" or something?","created_at":"2014-11-19T21:08:00Z","updated_at":"2014-11-19T21:08:00Z","html_url":"https://github.com/aspnet/Diagnostics/pull/47#discussion_r20607609","pull_request_url":"https://api.github.com/repos/aspnet/Diagnostics/pulls/47","_links":{"self":{"href":"https://api.github.com/repos/aspnet/Diagnostics/pulls/comments/20607609"},"html":{"href":"https://github.com/aspnet/Diagnostics/pull/47#discussion_r20607609"},"pull_request":{"href":"https://api.github.com/repos/aspnet/Diagnostics/pulls/47"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/Diagnostics/pulls/47","id":23569119,"html_url":"https://github.com/aspnet/Diagnostics/pull/47","diff_url":"https://github.com/aspnet/Diagnostics/pull/47.diff","patch_url":"https://github.com/aspnet/Diagnostics/pull/47.patch","issue_url":"https://api.github.com/repos/aspnet/Diagnostics/issues/47","number":47,"state":"open","locked":false,"title":"elm logger","user":{"login":"SonjaKhan","id":2818455,"avatar_url":"https://avatars.githubusercontent.com/u/2818455?v=3","gravatar_id":"","url":"https://api.github.com/users/SonjaKhan","html_url":"https://github.com/SonjaKhan","followers_url":"https://api.github.com/users/SonjaKhan/followers","following_url":"https://api.github.com/users/SonjaKhan/following{/other_user}","gists_url":"https://api.github.com/users/SonjaKhan/gists{/gist_id}","starred_url":"https://api.github.com/users/SonjaKhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonjaKhan/subscriptions","organizations_url":"https://api.github.com/users/SonjaKhan/orgs","repos_url":"https://api.github.com/users/SonjaKhan/repos","events_url":"https://api.github.com/users/SonjaKhan/events{/privacy}","received_events_url":"https://api.github.com/users/SonjaKhan/received_events","type":"User","site_admin":false},"body":"moved this from the Logging repo (aspnet/Logging#38), removed the Mvc dependency from the sample, and fixed scoping","created_at":"2014-10-29T22:12:10Z","updated_at":"2014-11-19T21:08:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e0bd6e6327b9fa9074a9bfd37157114e55e2bc7f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/Diagnostics/pulls/47/commits","review_comments_url":"https://api.github.com/repos/aspnet/Diagnostics/pulls/47/comments","review_comment_url":"https://api.github.com/repos/aspnet/Diagnostics/pulls/comments/{number}","comments_url":"https://api.github.com/repos/aspnet/Diagnostics/issues/47/comments","statuses_url":"https://api.github.com/repos/aspnet/Diagnostics/statuses/241eb93b4f059867b4eb283ee5ef74b730934db0","head":{"label":"aspnet:elm","ref":"elm","sha":"241eb93b4f059867b4eb283ee5ef74b730934db0","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":17548048,"name":"Diagnostics","full_name":"aspnet/Diagnostics","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Diagnostics","description":"Middleware to show diagnostic information about a site, including error pages.","fork":false,"url":"https://api.github.com/repos/aspnet/Diagnostics","forks_url":"https://api.github.com/repos/aspnet/Diagnostics/forks","keys_url":"https://api.github.com/repos/aspnet/Diagnostics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Diagnostics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Diagnostics/teams","hooks_url":"https://api.github.com/repos/aspnet/Diagnostics/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Diagnostics/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Diagnostics/events","assignees_url":"https://api.github.com/repos/aspnet/Diagnostics/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Diagnostics/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Diagnostics/tags","blobs_url":"https://api.github.com/repos/aspnet/Diagnostics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Diagnostics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Diagnostics/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Diagnostics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Diagnostics/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Diagnostics/languages","stargazers_url":"https://api.github.com/repos/aspnet/Diagnostics/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Diagnostics/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Diagnostics/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Diagnostics/subscription","commits_url":"https://api.github.com/repos/aspnet/Diagnostics/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Diagnostics/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Diagnostics/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Diagnostics/issues/comments/{number}","contents_url":"https://api.github.com/repos/aspnet/Diagnostics/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Diagnostics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Diagnostics/merges","archive_url":"https://api.github.com/repos/aspnet/Diagnostics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Diagnostics/downloads","issues_url":"https://api.github.com/repos/aspnet/Diagnostics/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Diagnostics/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Diagnostics/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Diagnostics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Diagnostics/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Diagnostics/releases{/id}","created_at":"2014-03-08T18:25:57Z","updated_at":"2014-11-19T18:07:23Z","pushed_at":"2014-11-19T19:08:58Z","git_url":"git://github.com/aspnet/Diagnostics.git","ssh_url":"git@github.com:aspnet/Diagnostics.git","clone_url":"https://github.com/aspnet/Diagnostics.git","svn_url":"https://github.com/aspnet/Diagnostics","homepage":"","size":1583,"stargazers_count":23,"watchers_count":23,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":19,"forks":11,"open_issues":19,"watchers":23,"default_branch":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"1ff89669a8162d09833ef5b94537d9c11f963b52","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":17548048,"name":"Diagnostics","full_name":"aspnet/Diagnostics","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Diagnostics","description":"Middleware to show diagnostic information about a site, including error pages.","fork":false,"url":"https://api.github.com/repos/aspnet/Diagnostics","forks_url":"https://api.github.com/repos/aspnet/Diagnostics/forks","keys_url":"https://api.github.com/repos/aspnet/Diagnostics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Diagnostics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Diagnostics/teams","hooks_url":"https://api.github.com/repos/aspnet/Diagnostics/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Diagnostics/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Diagnostics/events","assignees_url":"https://api.github.com/repos/aspnet/Diagnostics/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Diagnostics/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Diagnostics/tags","blobs_url":"https://api.github.com/repos/aspnet/Diagnostics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Diagnostics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Diagnostics/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Diagnostics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Diagnostics/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Diagnostics/languages","stargazers_url":"https://api.github.com/repos/aspnet/Diagnostics/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Diagnostics/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Diagnostics/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Diagnostics/subscription","commits_url":"https://api.github.com/repos/aspnet/Diagnostics/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Diagnostics/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Diagnostics/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Diagnostics/issues/comments/{number}","contents_url":"https://api.github.com/repos/aspnet/Diagnostics/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Diagnostics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Diagnostics/merges","archive_url":"https://api.github.com/repos/aspnet/Diagnostics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Diagnostics/downloads","issues_url":"https://api.github.com/repos/aspnet/Diagnostics/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Diagnostics/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Diagnostics/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Diagnostics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Diagnostics/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Diagnostics/releases{/id}","created_at":"2014-03-08T18:25:57Z","updated_at":"2014-11-19T18:07:23Z","pushed_at":"2014-11-19T19:08:58Z","git_url":"git://github.com/aspnet/Diagnostics.git","ssh_url":"git@github.com:aspnet/Diagnostics.git","clone_url":"https://github.com/aspnet/Diagnostics.git","svn_url":"https://github.com/aspnet/Diagnostics","homepage":"","size":1583,"stargazers_count":23,"watchers_count":23,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":19,"forks":11,"open_issues":19,"watchers":23,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/Diagnostics/pulls/47"},"html":{"href":"https://github.com/aspnet/Diagnostics/pull/47"},"issue":{"href":"https://api.github.com/repos/aspnet/Diagnostics/issues/47"},"comments":{"href":"https://api.github.com/repos/aspnet/Diagnostics/issues/47/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/Diagnostics/pulls/47/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/Diagnostics/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/aspnet/Diagnostics/pulls/47/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/Diagnostics/statuses/241eb93b4f059867b4eb283ee5ef74b730934db0"}}}}