Skip to content

Commit

Permalink
Version 0.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-pickin-epi committed Sep 25, 2024
1 parent d9c3992 commit 49958fb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.3
0.0.4
10 changes: 9 additions & 1 deletion lib/fluent/plugin/filter_flatten.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,18 @@ def filter(tag, time, record)
end

def flatten(record)
unless @field.to_s.length > 0
raise Fluent::ConfigError, "Invalid invocation: field not defined"
end

newrecord = {}

record.each do |key, value|
newkey = key.gsub(/\./, @separator)
if key.match(@field)
newkey = key.gsub(/\./, @separator)
else
newkey = key
end

# Recurse hashes and arrays:
if @recurse
Expand Down

0 comments on commit 49958fb

Please sign in to comment.