@@ -144,7 +144,7 @@ func (l *labelsMap) String() string {
144
144
}
145
145
146
146
func (l * labelsMap ) Set (label string ) error {
147
- for _ , pair := range strings .Split (label , "," ) {
147
+ for pair := range strings .SplitSeq (label , "," ) {
148
148
split := strings .Split (pair , ":" )
149
149
if len (split ) != 2 {
150
150
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
233
233
if err := trace .Init (filepath .Join (cConfig .ConfigPaths .DataDir , "trace" )); err != nil {
234
234
return nil , fmt .Errorf ("while setting up trace directory: %w" , err )
235
235
}
236
+
236
237
var logLevelViaFlag bool
238
+
237
239
cConfig .Common .LogLevel , logLevelViaFlag = newLogLevel (cConfig .Common .LogLevel , flags )
238
240
239
241
if dumpFolder != "" {
@@ -301,24 +303,14 @@ func LoadConfig(configFile string, disableAgent bool, disableAPI bool, quiet boo
301
303
if cConfig .API != nil && cConfig .API .Server != nil {
302
304
cConfig .API .Server .OnlineClient = nil
303
305
}
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
- }
308
306
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 )
310
308
}
311
309
312
310
if cConfig .Common .PidDir != "" {
313
311
log .Warn ("Deprecation warning: the pid_dir config can be safely removed and is not required" )
314
312
}
315
313
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
-
322
314
// recap of the enabled feature flags, because logging
323
315
// was not enabled when we set them from envvars
324
316
if fflist := csconfig .ListFeatureFlags (); fflist != "" {
0 commit comments