refactored log handling
Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
parent
a78b84429d
commit
6ca81dacf9
@ -26,16 +26,14 @@ func (c serviceTask) Run(ctx context.Context, pctx *plancontext.Context, s solve
|
|||||||
return nil, errors.New("invalid service")
|
return nil, errors.New("invalid service")
|
||||||
}
|
}
|
||||||
|
|
||||||
lg := log.Ctx(ctx).Debug()
|
lg := log.Ctx(ctx)
|
||||||
|
|
||||||
if unix != "" {
|
if unix != "" {
|
||||||
lg.Str("unix", unix)
|
lg.Debug().Str("unix", unix).Msg("loading service")
|
||||||
} else if npipe != "" {
|
} 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)
|
service := pctx.Services.New(unix, npipe)
|
||||||
out := compiler.NewValue()
|
out := compiler.NewValue()
|
||||||
if err := out.FillPath(cue.ParsePath("service"), service.MarshalCUE()); err != nil {
|
if err := out.FillPath(cue.ParsePath("service"), service.MarshalCUE()); err != nil {
|
||||||
|
Reference in New Issue
Block a user