logstash-plugins / logstash-filter-mutate

Apache License 2.0
16 stars 75 forks source link

Feature request: capitalize #105

Closed steeevieee closed 6 years ago

steeevieee commented 7 years ago

Would it be possible to support "capitalize" on fieldnames, in the same way you support "lowercase" ? We have historical data, most of which uses capitalized fieldnames but some uses random cases, so I don't want to retrospectively convert it all to lowercase

jsvd commented 7 years ago

this is indeed possible, feel free to submit a patch, the feature seems simple to implement, following the implementation of upcase

As an alternative, you can use the ruby filter filter { ruby { code => "event.set('[field]', event.get('[field]').capitalize" } }