Open Alainx277 opened 3 weeks ago
This also happens if a line is terminated with a literal backslash:
<filter test>
@type record_transformer
<record>
hello "world \\
test"
</record>
</filter>
It seems that the limitation of current implementation. As a workaround, use "\n" explicitly.
Thanks for your report. It appears this is a bug of Fluentd.
This works.
<filter test.**>
@type record_transformer
<record>
hello "world
"
</record>
</filter>
However, the following don't work.
<filter test.**>
@type record_transformer
<record>
hello "world
"
</record>
</filter>
<filter test.**>
@type record_transformer
<record>
hello 'world
'
</record>
</filter>
<filter test.**>
@type record_transformer
<record>
hello 'world
'
</record>
</filter>
It looks like single-quoted strings don't support multiline. https://docs.fluentd.org/configuration/config-file#multiline-support-for-quoted-string-array-and-hash-values
So, we need to check double quoted strings behavior, as @Alainx277 says.
Describe the bug
When quoting a string it is possible to have text that goes on multiple lines. If the multiline string contains an empty line however, the parser fails even if the string is properly closed.
To Reproduce
Create a fluentd config like this:
Run fluentd in dry-run mode:
Expected behavior
The string should be parsed like any other multiline string. In this case I'd expect
hello
to be set to"world\n\n"
.Your Environment
Your Configuration
Your Error Log
Additional context
No response