diff options
| author | k8s-ci-robot <k8s-ci-robot@users.noreply.github.com> | 2018-05-24 17:02:32 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-24 17:02:32 -0700 |
| commit | fa8903145c8cb8d6e08356a3e7e5a33c86ac7f7c (patch) | |
| tree | ad063e512c3d1780aeeef3588ee1b3db81dfb3ec | |
| parent | 3b5dc10fc92ef608dd0796b45455810916faf3c4 (diff) | |
| parent | 31e09936537bdeee22736738d4a0c378e2502e81 (diff) | |
Merge pull request #2189 from yujuhong/cri-log-format
Update the documentation of CRI log format
| -rw-r--r-- | contributors/design-proposals/node/kubelet-cri-logging.md | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/contributors/design-proposals/node/kubelet-cri-logging.md b/contributors/design-proposals/node/kubelet-cri-logging.md index a19ff3f5..12d0624d 100644 --- a/contributors/design-proposals/node/kubelet-cri-logging.md +++ b/contributors/design-proposals/node/kubelet-cri-logging.md @@ -142,11 +142,22 @@ extend this by maintaining a metadata file in the pod directory. **Log format** The runtime should decorate each log entry with a RFC 3339Nano timestamp -prefix, the stream type (i.e., "stdout" or "stderr"), and ends with a newline. +prefix, the stream type (i.e., "stdout" or "stderr"), the tags of the log +entry, the log content that ends with a newline. +The `tags` fields can support multiple tags, delimited by `:`. Currently, only +one tag is defined in CRI to support multi-line log entries: partial or full. +Partial (`P`) is used when a log entry is split into multiple lines by the +runtime, and the entry has not ended yet. Full (`F`) indicates that the log +entry is completed -- it is either a single-line entry, or this is the last +line of the muiltple-line entry. + +For example, ``` -2016-10-06T00:17:09.669794202Z stdout The content of the log entry 1 -2016-10-06T00:17:10.113242941Z stderr The content of the log entry 2 +2016-10-06T00:17:09.669794202Z stdout F The content of the log entry 1 +2016-10-06T00:17:09.669794202Z stdout P First line of log entry 2 +2016-10-06T00:17:09.669794202Z stdout P Second line of the log entry 2 +2016-10-06T00:17:10.113242941Z stderr F Last line of the log entry 2 ``` With the knowledge, kubelet can parses the logs and serve them for `kubectl |
