# Quick question on type

**URL:** <https://discuss.elastic.co/t/quick-question-on-type/62996>\
**Category:** Logstash\
**Created:** [October 13, 2016, 8:44pm UTC](https://discuss.elastic.co/t/quick-question-on-type/62996 "2016-10-13T20:44:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DigiAngel](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@DigiAngel](https://discuss.elastic.co/u/DigiAngel)\
**Post date:** [October 13, 2016, 8:44pm UTC](https://discuss.elastic.co/t/quick-question-on-type/62996/1 "2016-10-13T20:44:02Z")

</div>

So per [2.4.0 breaking changes](https://www.elastic.co/guide/en/logstash/2.4/breaking-changes.html#_removed_plugin_configuration_settings) type is no workie in filter/output now. I currently have a logstash config with this structure:

```
input {
        file {
                type => "log"
        }
}

filter {
        if ( [type] == "log" and [message] !~ "bleh" ) {
                drop { }
        } else {
do stuff
}

```

and it's working with logstash beta. Is this still considered type use in the filter plugin configuration setting? Thanks.

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [October 13, 2016, 9:53pm UTC](https://discuss.elastic.co/t/quick-question-on-type/62996/2 "2016-10-13T21:53:09Z")

</div>

Type isn't deprecated in the way you're thinking.

Here's what it actually means. In older versions of Logstash, before there were any conditionals, you would do this:

```auto
input {
  plugin {
    setting => value
    type => "mytype"
  }
}

filter {
  grok { 
    match => { "fieldname" => "%{GROKPATTERN:msg}" }
    type => "mytype"
  }
}

```

Note that `type` in the bad grok filter example above is used as a conditional, so that only messages of type "mytype" are processed.

Now that Logstash has conditionals, type is redundant, and has been removed.

Using `type` as a regular field for evaluation within conditionals is 100% okay.

---

<div class="post-metadata">

**Author:** ![DigiAngel](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@DigiAngel](https://discuss.elastic.co/u/DigiAngel)\
**Post date:** [October 13, 2016, 9:55pm UTC](https://discuss.elastic.co/t/quick-question-on-type/62996/3 "2016-10-13T21:55:09Z")

</div>

Perfect...totally explains it...thanks as always Aaron 🙂

---

<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, 4:34am UTC](https://discuss.elastic.co/t/quick-question-on-type/62996/4 "2017-07-06T04:34:18Z")

</div>


