MCPcopy Index your code
hub / github.com/devspace-sh/devspace / startLogs

Method startLogs

pkg/devspace/devpod/devpod.go:376–391  ·  view source on GitHub ↗
(ctx devspacecontext.Context, devPodConfig *latest.DevPod, selectedPod *selector.SelectedPodContainer, parent *tomb.Tomb)

Source from the content-addressed store, hash-verified

374}
375
376func (d *devPod) startLogs(ctx devspacecontext.Context, devPodConfig *latest.DevPod, selectedPod *selector.SelectedPodContainer, parent *tomb.Tomb) error {
377 ctx = ctx.WithLogger(ctx.Log().WithPrefixColor("logs ", "yellow+b"))
378 loader.EachDevContainer(devPodConfig, func(devContainer *latest.DevContainer) bool {
379 if devContainer.Logs == nil || (devContainer.Logs.Enabled != nil && !*devContainer.Logs.Enabled) {
380 return true
381 }
382
383 parent.Go(func() error {
384 return logs.StartLogs(ctx, devContainer, newTargetSelector(selectedPod.Pod.Name, selectedPod.Pod.Namespace, selectedPod.Container.Name, parent))
385 })
386
387 return true
388 })
389
390 return nil
391}
392
393func (d *devPod) getAttachDevContainer(devPodConfig *latest.DevPod) *latest.DevContainer {
394 // find dev container config

Callers 1

startMethod · 0.95

Calls 7

EachDevContainerFunction · 0.92
StartLogsFunction · 0.92
newTargetSelectorFunction · 0.85
GoMethod · 0.80
WithLoggerMethod · 0.65
WithPrefixColorMethod · 0.65
LogMethod · 0.65

Tested by

no test coverage detected