# Sprintf format doesn't work in clone filter

**URL:** https://discuss.elastic.co/t/sprintf-format-doesnt-work-in-clone-filter/27815
**Category:** Logstash
**Created:** [August 21, 2015, 6:51am UTC](https://discuss.elastic.co/t/sprintf-format-doesnt-work-in-clone-filter/27815 "2015-08-21T06:51:55Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dtrv](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@dtrv](https://discuss.elastic.co/u/dtrv)
#### Post date: [August 21, 2015, 6:51am UTC](https://discuss.elastic.co/t/sprintf-format-doesnt-work-in-clone-filter/27815/1 "2015-08-21T06:51:55Z")

</div>

Hi.

To keep the type of an event when it is cloned, I wantet to use

```
clone { clones => ["%{type}_cloned"] }

```

and end up with an type `%{type}_cloned` instead of `my_type_cloned`.

Is this a bug or a feature?

You can try this config to repoduce it on the command line:

```
-e 'filter { clone { clones => ["foo_%{host}"] add_tag => "%{host}"} }'

```

The tags should contain your hostname while the type stays `foo_%{host}`.

How can I keep the type even in cloned events? Tagging it is good enough for me.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 5:31am UTC](https://discuss.elastic.co/t/sprintf-format-doesnt-work-in-clone-filter/27815/2 "2017-07-06T05:31:24Z")

</div>


