fluent / fluentd-docs

This repository is deprecated. Go to fluentd-docs-gitbook repository.
49 stars 119 forks source link

Documentation for record_transformer seems wrong #454

Closed bigsleep closed 6 years ago

bigsleep commented 6 years ago

I tried to use tag_suffix placeholder in my configuration, but I cannot transform log records as I intended.

In the documentation

tag_suffix[N] refers to the last N parts of the tag. It works like the usual zero-based array accessor.

but actual behavior seems

${tag_suffix[N]} Tag parts after and on the index N.

written in https://github.com/sonots/fluent-plugin-record-reformer/blob/master/README.md.

Maybe tag_prefix's explanation is also wrong.

fujimotos commented 6 years ago

Thanks for the report!

I've fixed the description for tag_prefix and tag_suffix and submit the fix as #455. (Also I added some examples to the section to make the reader's life slightly easier).

Since this patch has been merged into the mainline a while ago, this issue should be resolved by now.

fujimotos commented 6 years ago

Note that the fix above has been already deployed to docs.fluentd.org:

https://docs.fluentd.org/v1.0/articles/filter_record_transformer#%3Crecord%3E-directive

If you find some issue about the doc, please feel free to feedback us.