{"record":{"id":"17ea7b26f1a99a4b","repo":"crowdsecurity/crowdsec","slug":"parsing-follow-stdout-parameters-s","errorCode":null,"errorMessage":"parsing 'follow_stdout' parameters: %s","messagePattern":"parsing 'follow_stdout' parameters: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/acquisition/modules/docker/config.go","lineNumber":271,"sourceCode":"\t\t\t}\n\t\t\td.logger.Logger.SetLevel(lvl)\n\t\tcase \"until\":\n\t\t\tif len(v) != 1 {\n\t\t\t\treturn errors.New(\"only one 'until' parameters is required, not many\")\n\t\t\t}\n\t\t\td.containerLogsOptions.Until = v[0]\n\t\tcase \"since\":\n\t\t\tif len(v) != 1 {\n\t\t\t\treturn errors.New(\"only one 'since' parameters is required, not many\")\n\t\t\t}\n\t\t\td.containerLogsOptions.Since = v[0]\n\t\tcase \"follow_stdout\":\n\t\t\tif len(v) != 1 {\n\t\t\t\treturn errors.New(\"only one 'follow_stdout' parameters is required, not many\")\n\t\t\t}\n\t\t\tfollowStdout, err := strconv.ParseBool(v[0])\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"parsing 'follow_stdout' parameters: %s\", err)\n\t\t\t}\n\t\t\td.Config.FollowStdout = followStdout\n\t\t\td.containerLogsOptions.ShowStdout = followStdout\n\t\tcase \"follow_stderr\":\n\t\t\tif len(v) != 1 {\n\t\t\t\treturn errors.New(\"only one 'follow_stderr' parameters is required, not many\")\n\t\t\t}\n\t\t\tfollowStdErr, err := strconv.ParseBool(v[0])\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"parsing 'follow_stderr' parameters: %s\", err)\n\t\t\t}\n\t\t\td.Config.FollowStdErr = followStdErr\n\t\t\td.containerLogsOptions.ShowStderr = followStdErr\n\t\tcase \"docker_host\":\n\t\t\tif len(v) != 1 {\n\t\t\t\treturn errors.New(\"only one 'docker_host' parameters is required, not many\")\n\t\t\t}\n\t\t\topts = append(opts, client.WithHost(v[0]))","sourceCodeStart":253,"sourceCodeEnd":289,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/acquisition/modules/docker/config.go#L253-L289","documentation":"The `follow_stdout` DSN parameter must be a boolean parsed with strconv.ParseBool (accepts 1/t/T/true/TRUE/True and 0/f/F/false/FALSE/False). Any other value aborts configuration with this error, embedding the strconv error message.","triggerScenarios":"ConfigureByDSN seeing `?follow_stdout=<v>` where strconv.ParseBool fails — e.g. follow_stdout=yes, on, 2, or an empty value from `follow_stdout=`.","commonSituations":"Using yes/no or on/off style booleans in the DSN; trailing whitespace or quotes captured into the value; templated config inserting a non-boolean.","solutions":["Change the value to `true` or `false` (or 1/0).","Remove quotes/whitespace accidentally included in the DSN parameter.","Remember the parameter can appear at most once (`only one ... is required, not many`)."],"exampleFix":"// before\ndocker://mycontainer?follow_stdout=yes\n// after\ndocker://mycontainer?follow_stdout=true","handlingStrategy":"validation","validationCode":"if v := dsnQuery.Get(\"follow_stdout\"); v != \"\" {\n    if _, err := strconv.ParseBool(v); err != nil {\n        return fmt.Errorf(\"follow_stdout must be a Go bool string, got %q\", v)\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only use true/false/1/0 for DSN boolean parameters.","Beware templating inserting empty or quoted values.","Document that yes/no/on/off are not accepted."],"tags":["config","boolean","dsn"],"backgroundTag":"invalid-flag-value","analyzedSha":"909b5157986a2b2c2163300fdaef5ed01289f7d2","analyzedAt":"2026-09-06T12:27:26.012Z","contentChangedAt":"2026-09-06T12:27:26.012Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}