# JSON codec plugin - target option (http input)

**URL:** <https://discuss.elastic.co/t/json-codec-plugin-target-option-http-input/304217>\
**Category:** Logstash\
**Created:** [May 9, 2022, 8:04am UTC](https://discuss.elastic.co/t/json-codec-plugin-target-option-http-input/304217 "2022-05-09T08:04:41Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [May 9, 2022, 1:28pm UTC](https://discuss.elastic.co/t/json-codec-plugin-target-option-http-input/304217/2 "2022-05-09T13:28:01Z")

</div>

> [@sectex](#):
>
> Is there a way to suppress the log message?

You can append

```auto
logger.randomname.name = logstash.codec.json
logger.randomname.level = ERROR

```

to your log4j2.properties file. When I set the target option on a json codec the fields are moved under the target. For example,

```
input { generator { count => 1 lines => ['{ "a": 1 }'] codec => json { target => "[document]" } } }
filter {}
output { stdout { codec => rubydebug { metadata => false } } }

```

produces

```
  "document" => {
    "a" => 1
},

```

---

_[View the full topic](https://discuss.elastic.co/t/json-codec-plugin-target-option-http-input/304217)._
