Skip to content

Support use_nil for record values#75

Merged
repeatedly merged 2 commits intorepeatedly:masterfrom
kaorimatz:support-use_nil
Aug 23, 2025
Merged

Support use_nil for record values#75
repeatedly merged 2 commits intorepeatedly:masterfrom
kaorimatz:support-use_nil

Conversation

@kaorimatz
Copy link
Copy Markdown
Contributor

@kaorimatz kaorimatz commented Aug 23, 2025

$ cat fluent.conf
<source>
  @type forward
</source>

<filter t1>
  @type record_modifier
  <record>
    c "#{use_nil}"
  </record>
</filter>

<match t1>
  @type record_modifier
  tag t2
  <record>
    d "#{use_nil}"
  </record>
</match>

<match t2>
  @type stdout
</match>

$ echo '{"a":"b"}' | bundle exec fluent-cat t1

Before:

$ bundle exec fluentd -c fluent.conf
...
2025-08-23 12:26:51 +0900 [error]: unexpected error error_class=NoMethodError error="undefined method `include?' for nil:NilClass"

After:

$ bundle exec fluentd -c fluent.conf
...
2025-08-23 12:27:17.577618000 +0900 t2: {"a":"b","c":null,"d":null}

@repeatedly repeatedly merged commit f55519e into repeatedly:master Aug 23, 2025
5 checks passed
@repeatedly
Copy link
Copy Markdown
Owner

Thanks for the patch!

@repeatedly
Copy link
Copy Markdown
Owner

Released v2.2.1.

@kaorimatz
Copy link
Copy Markdown
Contributor Author

Thank you for taking the time to review and release the new version!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants