Skip to content

Commit

Permalink
Add return stack traces
Browse files Browse the repository at this point in the history
Signed-off-by: Avi Deitcher <avi@deitcher.net>
  • Loading branch information
deitch committed Jun 13, 2022
1 parent ac543dd commit 065dcb2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/buildkitd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,10 @@ func unaryInterceptor(globalCtx context.Context, tp trace.TracerProvider) grpc.U

resp, err = withTrace(ctx, req, info, handler)
if err != nil {
logrus.Errorf("%s returned error: %+v", info.FullMethod, stack.Formatter(err))
logrus.Errorf("%s returned error: %v", info.FullMethod, err)
if logrus.GetLevel() >= logrus.DebugLevel {
fmt.Fprintf(os.Stderr, "%+v", stack.Formatter(grpcerrors.FromGRPC(err)))
}
}
return
}
Expand Down

0 comments on commit 065dcb2

Please sign in to comment.