Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions runner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package runner

import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
Expand Down Expand Up @@ -177,10 +178,13 @@ func (w *Worker) makeUnaryRequest(ctx *context.Context, reqMD *metadata.MD, inpu
res, resErr = w.stub.InvokeRpc(*ctx, w.mtd, input, callOptions...)

if w.config.hasLog {
inputData, _ := input.MarshalJSON()
resData, _ := json.Marshal(res)

w.config.log.Debugw("Received response", "workerID", w.workerID, "call type", "unary",
"call", w.mtd.GetFullyQualifiedName(),
"input", input, "metadata", reqMD,
"response", res, "error", resErr)
"input", string(inputData), "metadata", reqMD,
"response", string(resData), "error", resErr)
}

return resErr
Expand Down