@@ -144,7 +144,7 @@ func (l *labelsMap) String() string {
144144}
145145
146146func (l * labelsMap ) Set (label string ) error {
147- for _ , pair := range strings .Split (label , "," ) {
147+ for pair := range strings .SplitSeq (label , "," ) {
148148 split := strings .Split (pair , ":" )
149149 if len (split ) != 2 {
150150 return fmt .Errorf ("invalid format for label '%s', must be key:value" , pair )
@@ -233,7 +233,9 @@ func LoadConfig(configFile string, disableAgent bool, disableAPI bool, quiet boo
233233 if err := trace .Init (filepath .Join (cConfig .ConfigPaths .DataDir , "trace" )); err != nil {
234234 return nil , fmt .Errorf ("while setting up trace directory: %w" , err )
235235 }
236+
236237 var logLevelViaFlag bool
238+
237239 cConfig .Common .LogLevel , logLevelViaFlag = newLogLevel (cConfig .Common .LogLevel , flags )
238240
239241 if dumpFolder != "" {
@@ -301,24 +303,14 @@ func LoadConfig(configFile string, disableAgent bool, disableAPI bool, quiet boo
301303 if cConfig .API != nil && cConfig .API .Server != nil {
302304 cConfig .API .Server .OnlineClient = nil
303305 }
304- // if the api is disabled as well, just read file and exit, don't daemonize
305- if cConfig .DisableAPI {
306- cConfig .Common .Daemonize = false
307- }
308306
309- log .Infof ("single file mode : log_media=%s daemonize=%t " , cConfig .Common .LogMedia , cConfig . Common . Daemonize )
307+ log .Infof ("single file mode : log_media=%s" , cConfig .Common .LogMedia )
310308 }
311309
312310 if cConfig .Common .PidDir != "" {
313311 log .Warn ("Deprecation warning: the pid_dir config can be safely removed and is not required" )
314312 }
315313
316- if cConfig .Common .Daemonize && runtime .GOOS == "windows" {
317- log .Debug ("Daemonization is not supported on Windows, disabling" )
318-
319- cConfig .Common .Daemonize = false
320- }
321-
322314 // recap of the enabled feature flags, because logging
323315 // was not enabled when we set them from envvars
324316 if fflist := csconfig .ListFeatureFlags (); fflist != "" {
0 commit comments