Skip to content

Commit 1335264

Browse files
committed
history: update formatting of error logs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
1 parent 8c27b5c commit 1335264

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

commands/history/inspect.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ func runInspect(ctx context.Context, dockerCli command.Cli, opts inspectOptions)
331331
for _, s := range errdefs.Sources(retErr) {
332332
s.Print(dockerCli.Out())
333333
}
334+
fmt.Fprintln(dockerCli.Out())
334335

335336
var ve *errdefs.VertexError
336337
if errors.As(retErr, &ve) {
@@ -343,9 +344,10 @@ func runInspect(ctx context.Context, dockerCli command.Cli, opts inspectOptions)
343344
return errors.Wrapf(err, "failed to load vertex logs %s", dgst)
344345
}
345346
if len(logs) > 0 {
346-
fmt.Fprintf(dockerCli.Out(), "\n => %s:\n", name)
347+
fmt.Fprintln(dockerCli.Out(), "Logs:")
348+
fmt.Fprintf(dockerCli.Out(), "> => %s:\n", name)
347349
for _, l := range logs {
348-
fmt.Fprintln(dockerCli.Out(), l)
350+
fmt.Fprintln(dockerCli.Out(), "> "+l)
349351
}
350352
fmt.Fprintln(dockerCli.Out())
351353
}

0 commit comments

Comments
 (0)