parser_multiline: correct the formatN parameter table - #660
Merged
Conversation
The table showed "nil" as the default for formatN, but the text right
below states it is a required parameter. A required parameter has no
default, so the two descriptions contradicted each other.
formatN is not a config_param either. Only format_firstline and
unmatched_lines are declared in parser_multiline.rb; format1 to format20
are read directly from the config element via conf["format#{i}"]. So the
string / nil shown in the table had no basis in the config system.
Align the table with the parent regexp parser page, where the required
regexp pattern "expression" is documented as "regexp | required
parameter". Keep the version (0.14.0), which matches when the multiline
parser plugin was introduced.
Refs fluent#466
Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
kenhys
approved these changes
Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fix the
formatNparameter table onparser/multiline.md:default:`nil`→required parametertype:string→regexpWhy
The article states "It is a required parameter." right, yet the table listed
nilas the default. A required parameter cannot have a default value, so the two descriptions contradicted each other.formatNis also not declared as aconfig_param. Inlib/fluent/plugin/parser_multiline.rb, onlyformat_firstlineandunmatched_linesare declared;format1toformat20are read directly from the config element insideparse_formats. So thestring/nilshown in the table had no basis in the config system.formatNis validated as a regular expression bycheck_format_regexp.https://github.com/fluent/fluentd/blob/469d5c239113f36788046f6222d840aee8615047/lib/fluent/plugin/parser_multiline.rb#L139-L149
Note
This addresses the remaining point of #466. That issue raised two problems: the undocumented
got incomplete line before first linewarning (handled in #655) and thisformatNtable mismatch. #466 was closed after #655 was merged, so this PR references it for context only.Refs #466