# Logstash: Exclude separator lines in logs

**URL:** <https://discuss.elastic.co/t/logstash-exclude-separator-lines-in-logs/175071>\
**Category:** Logstash\
**Created:** [April 2, 2019, 8:47pm UTC](https://discuss.elastic.co/t/logstash-exclude-separator-lines-in-logs/175071 "2019-04-02T20:47:51Z")\
**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:** [April 2, 2019, 9:23pm UTC](https://discuss.elastic.co/t/logstash-exclude-separator-lines-in-logs/175071/2 "2019-04-02T21:23:55Z")

</div>

```
    ruby {
        code => '
            if event.get("message").chars.uniq.length == 1
                event.cancel
            end
        '
    }
```

---

_[View the full topic](https://discuss.elastic.co/t/logstash-exclude-separator-lines-in-logs/175071)._
