{"record":{"id":"2f72457803171573","repo":"stamparm/maltrail","slug":"invalid-configuration-value-for-local-log-format-other","errorCode":null,"errorMessage":"invalid configuration value for 'LOCAL_LOG_FORMAT' ('{other}'), expected 'text' or 'json'","messagePattern":"invalid configuration value for 'LOCAL_LOG_FORMAT' \\('(.+?)'\\), expected 'text' or 'json'","errorType":"validation","errorClass":"ConfigError","httpStatus":null,"severity":"error","filePath":"sensor/src/config.rs","lineNumber":945,"sourceCode":"                    ConfigError(format!(\"invalid configuration value for 'CAPTURE_BUFFER_SIZE' ('{v}'): {e}\"))\n                })?\n            } else if capture_buffer > 0 {\n                capture_buffer.clamp(DEFAULT_CAPTURE_RING, MAX_INFERRED_CAPTURE_RING)\n            } else {\n                DEFAULT_CAPTURE_RING\n            }\n        };\n\n        // LOCAL_LOG_FORMAT: an unknown value is refused rather than silently treated as \"text\",\n        // because the whole point of setting it is that something downstream is expecting the\n        // other format.\n        let local_log_json = {\n            let v = get_str(&raw, \"LOCAL_LOG_FORMAT\");\n            match v.trim().to_ascii_lowercase().as_str() {\n                \"\" | \"text\" | \"plain\" => false,\n                \"json\" | \"ndjson\" => true,\n                other => {\n                    bail!(\"invalid configuration value for 'LOCAL_LOG_FORMAT' ('{other}'), expected 'text' or 'json'\")\n                }\n            }\n        };\n\n        let capture_fanout_mode = {\n            let v = get_str(&raw, \"CAPTURE_FANOUT_MODE\");\n            if v.trim().is_empty() {\n                // Unset. A single worker never forms a fanout group, so the mode is moot there.\n                // Above one it decides whether the scan heuristics survive being split at all -\n                // flow hashing costs 34% of them at 8 workers - so the default is the mode that\n                // does not quietly trade detections for throughput. An operator who wants the old\n                // behaviour asks for it by name.\n                if capture_workers > 1 {\n                    FanoutMode::Source\n                } else {\n                    FanoutMode::Hash\n                }\n            } else {","sourceCodeStart":927,"sourceCodeEnd":963,"githubUrl":"https://github.com/stamparm/maltrail/blob/77cfb06d7606506d101bbcec0786c77166c4255e/sensor/src/config.rs#L927-L963","documentation":"LOCAL_LOG_FORMAT selects the on-disk log format and must be empty, 'text'/'plain', or 'json'/'ndjson' (case-insensitive, whitespace-trimmed). Any other string bails with this message showing the offending value and the two accepted forms.","triggerScenarios":"Setting LOCAL_LOG_FORMAT to an unsupported token such as 'Textfile', 'csv', 'structured', 'syslog', or a misspelling like 'jason'; also values with stray inner characters after trimming.","commonSituations":"Admins guessing format names from other products (csv, logfmt); capitalization assumptions are fine (handled), but synonyms like 'logfmt' are not; copy-paste from documentation of a different tool.","solutions":["Set LOCAL_LOG_FORMAT=text (or 'plain') for human-readable logs, or json (or 'ndjson') for machine-readable logs.","Leave the value empty to get the default (text) format.","Check for typos and remove surrounding quotes or extra characters not trimmed by whitespace.","Consult the sensor docs for the exact accepted tokens."],"exampleFix":"// before (config.conf)\nLOCAL_LOG_FORMAT=csv\n\n// after (config.conf)\nLOCAL_LOG_FORMAT=json","handlingStrategy":"validation","validationCode":"let v = get_str(&raw, \"LOCAL_LOG_FORMAT\").trim().to_ascii_lowercase();\nif !(v.is_empty() || [\"text\", \"plain\", \"json\", \"ndjson\"].contains(&v.as_str())) {\n    eprintln!(\"LOCAL_LOG_FORMAT must be 'text' or 'json', got '{v}'\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use only the documented tokens: text/plain or json/ndjson.","Leave empty for the default rather than guessing a name.","Don't port format names from other log tools (csv, logfmt)."],"tags":["rust","configuration","logging"],"backgroundTag":"invalid-enum-value","analyzedSha":"77cfb06d7606506d101bbcec0786c77166c4255e","analyzedAt":"2026-09-13T03:50:16.010Z","contentChangedAt":"2026-09-13T03:50:16.010Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}