From 6ca81dacf9f7893ec2721438de59844cb8498a15 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Mon, 13 Dec 2021 12:45:38 -0700 Subject: [PATCH] refactored log handling Signed-off-by: Richard Jones --- plan/task/service.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plan/task/service.go b/plan/task/service.go index 09e31cb8..6f735427 100644 --- a/plan/task/service.go +++ b/plan/task/service.go @@ -26,16 +26,14 @@ func (c serviceTask) Run(ctx context.Context, pctx *plancontext.Context, s solve return nil, errors.New("invalid service") } - lg := log.Ctx(ctx).Debug() + lg := log.Ctx(ctx) if unix != "" { - lg.Str("unix", unix) + lg.Debug().Str("unix", unix).Msg("loading service") } else if npipe != "" { - lg.Str("npipe", npipe) + lg.Debug().Str("npipe", npipe).Msg("loading service") } - lg.Msg("loading service") - service := pctx.Services.New(unix, npipe) out := compiler.NewValue() if err := out.FillPath(cue.ParsePath("service"), service.MarshalCUE()); err != nil {