sonots/fluent-plugin-record-reformer — pull request #1 by xthexder (2014-01-19 23:25:03+00:00)
Title: Add tag_prefix and tag_suffix placeholders

For my particular use case, I found these new placeholders to be extremely useful.

I have logs coming from several servers, each prefixed with `hostname.*`, and I'm using record-reformer to add in extra per-host data before removing the hostname prefix.

**Placeholders added:**
* ${tag\_prefix[N]} the first N tag_parts, negative values give all but the last N tag_parts
* ${tag\_suffix[N]} the last N tag_parts, negative values give all but the first N tag_parts

**Examples:**
```
Input tag: prefix.test.tag.suffix

${tag_prefix[1]} => prefix
${tag_prefix[-2]} => prefix.test
${tag_suffix[2]} => tag.suffix
${tag_suffix[-1]} => test.tag.suffix
```

I modified the tests a bit to cover these placeholders.