summaryrefslogtreecommitdiff
path: root/pkg/logs
Commit message (Collapse)AuthorAge
* Merge pull request #2522 from mheon/fix_timestamp_format_logsOpenShift Merge Robot2019-03-04
|\ | | | | Change timestamp format for podman logs
| * Change timestamp format for podman logsMatthew Heon2019-03-04
| | | | | | | | | | | | | | | | | | | | | | The Golang standard library implementation of RFC3339Nano will trim trailing 0s from the nanoseconds portion of timestamps. This is undesirable for lining everything up nicely during terminal output. As the Golang developers have not seen fit to give us a better way, use the one that was proposed on the issue tracker but rejected. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | Add additional defense against 0-length log segfaultsMatthew Heon2019-03-03
| | | | | | | | Signed-off-by: Matthew Heon <mheon@redhat.com>
* | When logging with timestamps, append only until newlineMatthew Heon2019-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we log time timestamps, don't print a new timestamp for each input - instead, print one at the start of every line, and then wait until we hit a newline to print a new timestamp. This still doesn't exactly mirror the Docker behavior (they don't print until they receive an entire line, while we print any time the logs file is appended to - so you can see partial lines being typed in our system). Also, timestamps are recorded as the start of a line being typed, as opposed to when the enter key is pressed (on Docker). (Worth noting that, while characters are printed as they are typed, logs does respect the backspace key - so you'll also see them disappear as the person typing realizes they've made a mistake and retypes their command). This is the closest we can get to Docker without major surgery on the Kubernetes log-printing library, so I'm content to call this an adequate solution. Signed-off-by: Matthew Heon <mheon@redhat.com>
* | Ensure that each log line is newline-terminatedMatthew Heon2019-03-03
|/ | | | | | | | | When writing logs with timestamps to the terminal, ensure that each line is newline-terminated, so we don't end up with an unreadable mess with timestamps interspersed with the actual content being displayed. Signed-off-by: Matthew Heon <mheon@redhat.com>
* Add CRI logs parsing to podman logsumohnani82018-09-05
Podman logs was not parsing CRI logs well, especially the F and P logs. Now using the same parsing code as in kube here. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #1403 Approved by: rhatdan