diff --git a/jsonmessage/jsonmessage.go b/jsonmessage/jsonmessage.go index 451c6a9..4620483 100644 --- a/jsonmessage/jsonmessage.go +++ b/jsonmessage/jsonmessage.go @@ -92,6 +92,7 @@ func (p *JSONProgress) String() string { // the created time, where it from, status, ID of the // message. It's used for docker events. type JSONMessage struct { + RequestID string `json:"reqid,omitempty"` Stream string `json:"stream,omitempty"` Status string `json:"status,omitempty"` Progress *JSONProgress `json:"progressDetail,omitempty"` @@ -127,6 +128,9 @@ func (jm *JSONMessage) Display(out io.Writer, isTerminal bool) error { } else if jm.Time != 0 { fmt.Fprintf(out, "%s ", time.Unix(jm.Time, 0).Format(timeutils.RFC3339NanoFixed)) } + if jm.RequestID != "" { + fmt.Fprintf(out, "[reqid: %s] ", jm.RequestID) + } if jm.ID != "" { fmt.Fprintf(out, "%s: ", jm.ID) }