export: log exported value

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2021-01-20 13:03:28 -08:00
parent 644713e3f9
commit d22326b512

View File

@ -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
}