# Exclude property in File input plugin

**URL:** <https://discuss.elastic.co/t/exclude-property-in-file-input-plugin/74343>\
**Category:** Logstash\
**Created:** [February 8, 2017, 8:56am UTC](https://discuss.elastic.co/t/exclude-property-in-file-input-plugin/74343 "2017-02-08T08:56:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![spravn789](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@spravn789](https://discuss.elastic.co/u/spravn789)\
**Post date:** [February 8, 2017, 8:56am UTC](https://discuss.elastic.co/t/exclude-property-in-file-input-plugin/74343/1 "2017-02-08T08:56:35Z")

</div>

I have a directory with multiple log file [\*.log], among which i need to exclude few logs that starts with CBATest.log,BPLTest.log and ARCTest.log. Below provided is the configuration used. But these files are not excluded while processing.

Kindly help resolve this.

file {  
path =\> "E:/domain/DEV/application/logs/_.log"  
exclude =\> ["E:/domain/DEV/application/logs/CBA_.log", "E:/domain/DEV/application/logs/BPL\*.log" , "E:/domain/DEV/application/logs/ARC\*.log"]  
type =\> "esbbwlog"  
codec =\> multiline {  
patterns\_dir =\> "/patterns/devbw"  
pattern =\> "^%{BWTIME}"  
negate =\> true  
what =\> "previous"  
max\_lines =\> "1000"  
}

---

<div class="post-metadata">

**Author:** ![fbaligand](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fbaligand/32/5657_2.png) [@fbaligand](https://discuss.elastic.co/u/fbaligand)\
**Post date:** [February 8, 2017, 1:41pm UTC](https://discuss.elastic.co/t/exclude-property-in-file-input-plugin/74343/2 "2017-02-08T13:41:09Z")

</div>

Extract from file input doc, concerning "exclude" option :

> Exclusions (matched against the filename, not full path).

So the right exclude option should be :  
`exclude => ["CBA*.log", "BPL*.log" , "ARC*.log"]`

---

<div class="post-metadata">

**Author:** ![spravn789](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@spravn789](https://discuss.elastic.co/u/spravn789)\
**Post date:** [February 13, 2017, 7:04am UTC](https://discuss.elastic.co/t/exclude-property-in-file-input-plugin/74343/3 "2017-02-13T07:04:14Z")

</div>

Thanks Fabien

Its Working now.

---

<div class="post-metadata">

**Author:** ![fbaligand](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fbaligand/32/5657_2.png) [@fbaligand](https://discuss.elastic.co/u/fbaligand)\
**Post date:** [February 13, 2017, 7:25am UTC](https://discuss.elastic.co/t/exclude-property-in-file-input-plugin/74343/4 "2017-02-13T07:25:10Z")

</div>

You're welcome 🙂

Can you mark my previous comment as solution ?

---

<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:** [March 13, 2017, 7:25am UTC](https://discuss.elastic.co/t/exclude-property-in-file-input-plugin/74343/5 "2017-03-13T07:25:15Z")

</div>

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