(ctx devspacecontext.Context, name, arch string, syncConfig *latest.SyncConfig, selector targetselector.TargetSelector, starter sync.DelayedContainerStarter, parent *tomb.Tomb)
| 116 | } |
| 117 | |
| 118 | func startSync(ctx devspacecontext.Context, name, arch string, syncConfig *latest.SyncConfig, selector targetselector.TargetSelector, starter sync.DelayedContainerStarter, parent *tomb.Tomb) error { |
| 119 | // set options |
| 120 | options := &Options{ |
| 121 | Name: name, |
| 122 | Selector: selector, |
| 123 | SyncConfig: syncConfig, |
| 124 | Arch: arch, |
| 125 | Starter: starter, |
| 126 | |
| 127 | RestartOnError: true, |
| 128 | Verbose: ctx.Log().GetLevel() == logrus.DebugLevel, |
| 129 | } |
| 130 | |
| 131 | // should we print the logs? |
| 132 | if syncConfig.PrintLogs || ctx.Log().GetLevel() == logrus.DebugLevel { |
| 133 | options.SyncLog = ctx.Log() |
| 134 | } else { |
| 135 | options.SyncLog = logpkg.GetDevPodFileLogger(name) |
| 136 | } |
| 137 | |
| 138 | return NewController().Start(ctx, options, parent) |
| 139 | } |
no test coverage detected