New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inverted: true should always do the opposite of inverted: false #96
Comments
While having the parameter can be nice, I believe can be achieved with |
Hi @okkez ( CC: @daipom / @ashie ) |
@y-ken Thanks! Sorry I'm not aware of this.
|
My understanding is as follows. Is it correct?
So, if inverting |
Sorry, I missed one point. When the key does not exist, is it expected that all patterns do not match? Note: This changes checking |
Following configuration:
If we test the rewrite filter with two log messages:
=> pattern matches
=> new tag is string.something, perfect
first rule:
=> "check if recordvalue.isempty returns true in https://github.com/fluent/fluent-plugin-rewrite-tag-filter/blob/master/lib/fluent/plugin/out_rewrite_tag_filter.rb#L102
=> next
2nd rule:
match_operator != MATCH_OPERATOR_EXCLUDE fails so, no next this time
regexp_last_match(regexp, rewritevalue) returns true because /.*/ matches on an empty string
=> next if last_match because last_match is true
=> log message discarded with the message "rewrite_tag_filter: tag has not been rewritten"
Possible solutions would be
Please let me know your preferences, I will file a PR
A workaround is to write a regex that requires at least one character. For example /.+/
The text was updated successfully, but these errors were encountered: