# Not working exclude in file plugin on logstash-6.5.0

**URL:** <https://discuss.elastic.co/t/not-working-exclude-in-file-plugin-on-logstash-6-5-0/157942>\
**Category:** Logstash\
**Created:** [November 22, 2018, 9:07pm UTC](https://discuss.elastic.co/t/not-working-exclude-in-file-plugin-on-logstash-6-5-0/157942 "2018-11-22T21:07:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrianVitaliy](https://avatars.discourse-cdn.com/v4/letter/b/b2d939/32.png) [@BrianVitaliy](https://discuss.elastic.co/u/BrianVitaliy)\
**Post date:** [November 22, 2018, 9:07pm UTC](https://discuss.elastic.co/t/not-working-exclude-in-file-plugin-on-logstash-6-5-0/157942/1 "2018-11-22T21:07:55Z")

</div>

Hi. For test I have easy configuration

> ```
> input {
> file {
> path => "e:/work/__testing/testELK/logs/*.log"
> exclude => "test2.log"
> codec => "json"
> start_position => "beginning"
> }
> }
> output {
> file {
> path => "E:/work/__testing/testELK/out.log"
> }
> }
> 
> ```

and 3 files in folder .../logs/test1.log, test2.log, test3.log But "exclude" not work. When I add line in all files, I see all in out.log:

```
{"message":"INCOMMING : null","@timestamp":"2018-11-19T10:15:42.984Z","path":"e:/work/__testing/testELK/logs/test1.log","host":"domPC","level":"INFO","mdc":{"UUID":"3e5876f8-964e-4e44-94d6-42528ba68110"},"@version":"1","source_host":"VitaliyPK","method":"doFilter"}
{"message":"INCOMMING : null","@timestamp":"2018-11-19T10:15:42.984Z","path":"e:/work/__testing/testELK/logs/test2.log","host":"domPC","level":"INFO","mdc":{"UUID":"3e5876f8-964e-4e44-94d6-42528ba68110"},"@version":"1","source_host":"VitaliyPK","method":"doFilter"}
{"message":"INCOMMING : null","@timestamp":"2018-11-19T10:15:42.984Z","path":"e:/work/__testing/testELK/logs/test3.log","host":"domPC","level":"INFO","mdc":{"UUID":"3e5876f8-964e-4e44-94d6-42528ba68110"},"@version":"1","source_host":"VitaliyPK","method":"doFilter"}

```

I try this config on logstash-6.2.3 an all work correct. In out.log i have only data from test1.log and test3.log. Can you help me, I do something wrong ?

---

<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:** [December 20, 2018, 9:08pm UTC](https://discuss.elastic.co/t/not-working-exclude-in-file-plugin-on-logstash-6-5-0/157942/2 "2018-12-20T21:08:00Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
