{"record":{"id":"c13ea5611ee0bc4e","repo":"apache/seatunnel","slug":"input-multiline-match-must-be-after-or-before","errorCode":null,"errorMessage":"input.multiline.match must be \"after\" or \"before\".","messagePattern":"input\\.multiline\\.match must be \"after\" or \"before\"\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-edge-agent/seatunnel-edge-agent-connector/src/main/java/org/apache/seatunnel/edge/agent/connector/config/FileCollectConfig.java","lineNumber":141,"sourceCode":"    }\n\n    public boolean isJsonOutput() {\n        return \"json\".equalsIgnoreCase(outputType);\n    }\n\n    public boolean isSkipOnError() {\n        return !\"fail\".equalsIgnoreCase(onError);\n    }\n\n    private static void validateOnError(String value) {\n        if (!value.equalsIgnoreCase(\"skip\") && !value.equalsIgnoreCase(\"fail\")) {\n            throw new IllegalArgumentException(\"input.on-error must be \\\"skip\\\" or \\\"fail\\\".\");\n        }\n    }\n\n    private static void validateMultilineMatch(String value) {\n        if (!value.equalsIgnoreCase(\"after\") && !value.equalsIgnoreCase(\"before\")) {\n            throw new IllegalArgumentException(\n                    \"input.multiline.match must be \\\"after\\\" or \\\"before\\\".\");\n        }\n    }\n\n    private static void validateOutputType(String value) {\n        if (!value.equalsIgnoreCase(\"line\") && !value.equalsIgnoreCase(\"json\")) {\n            throw new IllegalArgumentException(\n                    \"input.output-format.type must be \\\"line\\\" or \\\"json\\\".\");\n        }\n    }\n\n    private static Charset resolveCharset(String encodingName, String inputId) {\n        try {\n            return Charset.forName(encodingName);\n        } catch (IllegalCharsetNameException | UnsupportedCharsetException e) {\n            throw new IllegalArgumentException(\n                    \"input.encoding is not supported: \"\n                            + encodingName","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-edge-agent/seatunnel-edge-agent-connector/src/main/java/org/apache/seatunnel/edge/agent/connector/config/FileCollectConfig.java#L123-L159","documentation":"input.multiline.match decides whether lines matching multiline.pattern are appended after or before the previous line. FileCollectConfig.validateMultilineMatch accepts only \"after\" or \"before\" (case-insensitive) and throws this IllegalArgumentException otherwise.","triggerScenarios":"Setting input.multiline.match to values like \"next\", \"previous\", \"forward\", \"backward\", or an empty string.","commonSituations":"Confusion with other multiline implementations that use 'before/previous' style vocabularies, or truncated templated configs.","solutions":["Set input.multiline.match to \"after\" (pattern lines belong to the previous event) or \"before\" (pattern lines start a new event)","Verify the pattern/match pair semantics against your log format","Check that template rendering is not producing an empty match value"],"exampleFix":"# before\nmultiline.match = \"forward\"\n# after\nmultiline.match = \"after\"","handlingStrategy":"validation","validationCode":"String match = cfg.get(FileCollectOptions.MULTILINE_MATCH);\nif (!\"after\".equalsIgnoreCase(match) && !\"before\".equalsIgnoreCase(match)) { throw new IllegalArgumentException(\"multiline.match must be after or before\"); }","typeGuard":null,"tryCatchPattern":"try { FileCollectConfig.from(config); } catch (IllegalArgumentException e) { log.error(\"multiline.match invalid: {}\", e.getMessage()); }","preventionTips":["Only use the documented values after/before","Pair match direction with a tested multiline.pattern","Lint multiline configs before deployment"],"tags":["config","validation","enum","multiline"],"backgroundTag":"invalid-enum-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}