(ctx devspacecontext.Context, devPodConfig *latest.DevPod, selectedPod *selector.SelectedPodContainer, parent *tomb.Tomb)
| 374 | } |
| 375 | |
| 376 | func (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 | |
| 393 | func (d *devPod) getAttachDevContainer(devPodConfig *latest.DevPod) *latest.DevContainer { |
| 394 | // find dev container config |
no test coverage detected