)]}'
{
  "log": [
    {
      "commit": "edf5c4ff49e1aac2f7cd9052aa694f9b4c786457",
      "tree": "839c754fe09465aead87385cea5ecc5940f16146",
      "parents": [
        "12971d6c8031d06f497c81ae1ed2a5bee488e7d2"
      ],
      "author": {
        "name": "Serge Bazanski",
        "email": "serge@nexantic.com",
        "time": "Wed Nov 25 13:45:31 2020 +0100"
      },
      "committer": {
        "name": "Serge Bazanski",
        "email": "serge@nexantic.com",
        "time": "Wed Nov 25 13:45:31 2020 +0100"
      },
      "message": "logtree: slightly rearrange LeveledPayload/LogEntry\n\nThese were in awkward spots, a leftover from the multiple implementation\npasses of the logtree implementation.\n\nTo make things slightly easier to grok, we move payload.go into\nleveled_payload.go, to make it explicitly a subelement of the leveled\npart of the LogTree.\n\nWe also move LogEntry and its related functions into its own file,\nlogtree_entry.go, as logtree_access.go was a slightly awkward spot, too.\n\nTest Plan: Refactor, covered by existing tests.\n\nX-Origin-Diff: phab/D651\nGitOrigin-RevId: 298d68c91a7cd59059f21ade35ea17f0c9a93cc7\n"
    },
    {
      "commit": "12971d6c8031d06f497c81ae1ed2a5bee488e7d2",
      "tree": "3332b72dda28e9c3d476aba0dd63d8465a3245f7",
      "parents": [
        "b0272187ee577a94edb803b81413165b7c1a89ba"
      ],
      "author": {
        "name": "Serge Bazanski",
        "email": "serge@nexantic.com",
        "time": "Tue Nov 17 12:12:58 2020 +0100"
      },
      "committer": {
        "name": "Serge Bazanski",
        "email": "serge@nexantic.com",
        "time": "Tue Nov 17 12:12:58 2020 +0100"
      },
      "message": "logtree: capture multiple lines in leveled log entries\n\nThis implements a solution to a disputed answer to the following\nquestion:\n\n    “What happens when someone calls Infof(\"foo\\nbar\")?”\n\nMultiple answers immediately present themselves:\n\n    a) Don\u0027t do anything, whatever consumers logs needs to expect that\n       they might contain newlines.\n    b) Yell/error/panic so that the programmer doesn\u0027t do this.\n    c) Split the one Info call into multiple Info calls, one per line,\n       somewhere in the logging path.\n\nFollowing the argumentation for these we establish the follwoing\nrequirments for any solution:\n\n    1) We want the programmer to be able to log multiple lines from a\n       single Info call and have that not fail. This is especially\n       important for reliability - we don\u0027t want an accidental codepath\n       that suddenly starts printing %s-formatted user-controlled\n       messages to start erroring out in production. This rules out b).\n    2) We want to allow emitting multiple lines that will not be\n       interleaved when viewing the log data. This rules out c).\n    3) We want to prohibit log injection by malicious \\n-containing\n       payloads (in case of %s-formatted user-controlled content). This\n       rules out a).\n    4) If multiple lines are allowed in a leveled payload, the type\n       system should support that, so that log consumers/tools will not\n       forget to account for the possible newlines. This too rules out\n       a).\n\nWith these in mind, we instead opt for a different solutions: changing\nthe API of logtree and logging protos to contain multiple possible lines\nper single log entry. This is a breaking change, but since all access to\nlogs is currently self-contained within the Monogon OS codebase, we can\nafford this.\n\nTo support this change, we change the access API (at LogEntry and\nLeveledPayload level) to contain two different methods for retrieving\nthe canonical representation of an entry:\n\n    fn String() string\n\nwhich returns a string with possible intra-string newlines (but no\ntrailing newlines), but with each newline-delimited chunk having the\ncanonical text representation prefix for this message. This prevents\nnewline injection into logs creating fake prefixes.\n\n    fn Strings() (prefix string, lines []string)\n\nwhich returns a common prefix for this entry (in its text\nrepresentation) and a set of lines that were contained in the original\nlog entry. This allows slightly smarter consuming code to make more\nactive decisions regarding the rendering of a multi-line entry, while\nstill providing a canonical text formatted representation of that log\nentry.\n\nThese permit simple log access code that prints log data into a terminal\n(or terminal-like view), like dbg, to continue using the String() call.\nIn fact, no changes had to be made to dbg for it to continue working,\neven though the API underneath changed.\n\nNaturally, raw logging entries continue to contain only a single line,\nso no change is implemented in the LineBuffer API. The containing\nLogEntry for raw log entries emits single-lined Strings() results and no\nnewline-containing strings in String() results.\n\nTest Plan: Updated unit tests to cover this.\n\nX-Origin-Diff: phab/D650\nGitOrigin-RevId: 4e339a930c4cbefff91b289b07bc31f774745eca\n"
    },
    {
      "commit": "b0272187ee577a94edb803b81413165b7c1a89ba",
      "tree": "e270e4fc6d3497b4a6c8624ea7cd8ebbe7246a59",
      "parents": [
        "967be21df6e1f0e14ab66e904f5904261962f099"
      ],
      "author": {
        "name": "Serge Bazanski",
        "email": "serge@nexantic.com",
        "time": "Mon Nov 02 18:39:44 2020 +0100"
      },
      "committer": {
        "name": "Serge Bazanski",
        "email": "serge@nexantic.com",
        "time": "Mon Nov 02 18:39:44 2020 +0100"
      },
      "message": "core: plug logtree into NodeDebugService\n\nThis introduces a new Proto API for accessing debug logs. Currently this\nis implemented to be used by the debug service. However, these proto\ndefinitions will likely be reused for production cluster APIs.\n\nThe implementation mostly consists of adding the proto, implementing\nto/from conversion methods, and altering the debug service to use the\nnew API.\n\nWe also move all of the debug service implementation into a separate file,\nto slightly clean up main.go. This produces an unfortunately colorful\ndiff, but it\u0027s just moving code around.\n\nTest Plan: Manually tested using the dbg tool. We currently don\u0027t properly test the debug service. I suppose we should do that for the production cluster APIs, and just keep on going for now.\n\nX-Origin-Diff: phab/D649\nGitOrigin-RevId: ac454681e4b72b2876e313b3aeababa179eb1fa3\n"
    },
    {
      "commit": "f68153cf4d0a7a588113c847b2203e4c5c3529e8",
      "tree": "7453347ca5a87f5f16090c874885105e3bfb805f",
      "parents": [
        "1bfa0c2d9107cecb56ef6243133cfa12f4c3317b"
      ],
      "author": {
        "name": "Serge Bazanski",
        "email": "serge@nexantic.com",
        "time": "Mon Oct 26 13:54:37 2020 +0100"
      },
      "committer": {
        "name": "Serge Bazanski",
        "email": "serge@nexantic.com",
        "time": "Mon Oct 26 13:54:37 2020 +0100"
      },
      "message": "logtree: implement raw logging\n\nTest Plan: Covered by new tests.\n\nX-Origin-Diff: phab/D640\nGitOrigin-RevId: 786ab2851710bf2819dcb91571b3567e8da3e377\n"
    },
    {
      "commit": "1bfa0c2d9107cecb56ef6243133cfa12f4c3317b",
      "tree": "aeb008c1f685962e2d2387ed348435ef52534794",
      "parents": [
        "248b2ecab2a933024b443b29bb7f9872f38f2956"
      ],
      "author": {
        "name": "Serge Bazanski",
        "email": "serge@nexantic.com",
        "time": "Wed Oct 14 16:45:07 2020 +0200"
      },
      "committer": {
        "name": "Serge Bazanski",
        "email": "serge@nexantic.com",
        "time": "Wed Oct 14 16:45:07 2020 +0200"
      },
      "message": "logtree: rename payload to leveledpayload\n\nTest Plan: Refactor, covered by tests.\n\nX-Origin-Diff: phab/D639\nGitOrigin-RevId: 6c268c8b437a93c97720f110dbc9c39e95402648\n"
    },
    {
      "commit": "06d65bc4e57c4c83150a3b67fc33763d5360b80f",
      "tree": "3ee27d08628e68d5c5f971e24519bc3f0fc8082e",
      "parents": [
        "9e861a87775191faf1a027f603a0074446cd1319"
      ],
      "author": {
        "name": "Serge Bazanski",
        "email": "serge@nexantic.com",
        "time": "Thu Sep 24 10:51:59 2020 +0200"
      },
      "committer": {
        "name": "Serge Bazanski",
        "email": "serge@nexantic.com",
        "time": "Thu Sep 24 10:51:59 2020 +0200"
      },
      "message": "logtree: chase out some documentation typos\n\nTest Plan: only documentation changes.\n\nX-Origin-Diff: phab/D627\nGitOrigin-RevId: 78b1983bd67c632f467227689371113f26da5842\n"
    },
    {
      "commit": "5faa2fc7fb6266486183fdc1455e711079d33e37",
      "tree": "17203f2ac8ed9124b4573b2f9a05aaa92335190c",
      "parents": [
        "5ade732e7778b774caf03c850fbfaa7b67132d9b"
      ],
      "author": {
        "name": "Serge Bazanski",
        "email": "serge@nexantic.com",
        "time": "Mon Sep 07 14:09:30 2020 +0200"
      },
      "committer": {
        "name": "Serge Bazanski",
        "email": "serge@nexantic.com",
        "time": "Mon Sep 07 14:09:30 2020 +0200"
      },
      "message": "logtree: implement\n\nThis implements logtree, as per go/logtree .\n\nSome API changes are present, the design doc will be updated to reflect\nthese and the rationale behind the changes.\n\nThis implementation is missing \u0027raw\u0027 log functionality, this will be\nadded in a diff on top (as the implementation is trivial, but we want\nto keep this diff as simple as possible).\n\nTest Plan: covered by tests\n\nX-Origin-Diff: phab/D624\nGitOrigin-RevId: 6d1e0fb16f47e4b0dc9a18765cecb9314bbcb441\n"
    },
    {
      "commit": "5ade732e7778b774caf03c850fbfaa7b67132d9b",
      "tree": "ad467196bf11717d4193f45c346112ffe97c375b",
      "parents": [
        "a50e845df333a4d7531793e3fed61ca8411384f5"
      ],
      "author": {
        "name": "Serge Bazanski",
        "email": "serge@nexantic.com",
        "time": "Thu Aug 27 13:27:51 2020 +0200"
      },
      "committer": {
        "name": "Serge Bazanski",
        "email": "serge@nexantic.com",
        "time": "Thu Aug 27 13:27:51 2020 +0200"
      },
      "message": "logtree: implement LeveledLogger interface\n\nThis implementes the equivalent of StructuredLogger from go/logtree as\na pure interface for further implementation by LogTree (or other logging\nmechanism, eg. in tests).\n\nStructuredLogger was a slightly poor name (because of the unfortunate\nindustry understanding of what structured logging is), so we go ahead\nand rename that. Once this change goes through, the design document will\nbe reflected to rename \u0027Structured Logging\u0027 to \u0027Leveled Logging\u0027.\n\nWe base the API off of github.com/golang/glog, but without a single\nglobal instance. Other API differences include:\n - No {Info,Warning,Error,Fatal}ln calls, as these are pretty much\n   equivalent to {Info,Warning,Error,Fatal} calls.\n - V(n) now returns an interface with .Enabled(), instead of a boolean\n   value. This is necessary as the returned value will have to carry\n   its corresponding LeveledLogger instead of calling global functions.\n\nTest Plan: plain interface, untested\n\nX-Origin-Diff: phab/D620\nGitOrigin-RevId: 06c7e3a88751ff7503e8106fac2360cf8de621c4\n"
    }
  ]
}
