From d22326b512612feda8f14478753576e7a0a1ae32 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Wed, 20 Jan 2021 13:03:28 -0800 Subject: [PATCH] export: log exported value Signed-off-by: Andrea Luzzardi --- dagger/op.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dagger/op.go b/dagger/op.go index 72ea0b02..7a376bc2 100644 --- a/dagger/op.go +++ b/dagger/op.go @@ -202,6 +202,12 @@ func (op *Op) Export(ctx context.Context, fs FS, out Fillable) (FS, error) { } switch format { case "string": + log. + Ctx(ctx). + Debug(). + Bytes("contents", contents). + Msg("exporting string") + if err := out.Fill(string(contents)); err != nil { return fs, err } @@ -210,6 +216,13 @@ func (op *Op) Export(ctx context.Context, fs FS, out Fillable) (FS, error) { if err := json.Unmarshal(contents, &o); err != nil { return fs, err } + + log. + Ctx(ctx). + Debug(). + Interface("contents", o). + Msg("exporting json") + if err := out.Fill(o); err != nil { return fs, err }