# Logstash input-\>file

**URL:** <https://discuss.elastic.co/t/logstash-input-file/47671>\
**Category:** Logstash\
**Created:** [April 18, 2016, 2:53pm UTC](https://discuss.elastic.co/t/logstash-input-file/47671 "2016-04-18T14:53:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![birdbiubiubiu](https://avatars.discourse-cdn.com/v4/letter/b/67e7ee/32.png) [@birdbiubiubiu](https://discuss.elastic.co/u/birdbiubiubiu)\
**Post date:** [April 18, 2016, 2:53pm UTC](https://discuss.elastic.co/t/logstash-input-file/47671/1 "2016-04-18T14:53:01Z")

</div>

My log file is generated per day , similar to the file name access-2016-04-17.log、access-2016-04-18.log，How can I write input, read these files can be generic.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 18, 2016, 9:07pm UTC](https://discuss.elastic.co/t/logstash-input-file/47671/2 "2016-04-18T21:07:36Z")

</div>

You will want to use the file input - [https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html)

If you have other specific questions, please let us know.

---

<div class="post-metadata">

**Author:** ![birdbiubiubiu](https://avatars.discourse-cdn.com/v4/letter/b/67e7ee/32.png) [@birdbiubiubiu](https://discuss.elastic.co/u/birdbiubiubiu)\
**Post date:** [April 19, 2016, 1:46am UTC](https://discuss.elastic.co/t/logstash-input-file/47671/3 "2016-04-19T01:46:15Z")

</div>

should i write absolute path? Does it matter i wirte like this：“path =\> "/path/to/{+yyyy/MM/dd/hh}.log” ?  
Because my log generated daily by date, I need to load different log every day.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 19, 2016, 2:57am UTC](https://discuss.elastic.co/t/logstash-input-file/47671/4 "2016-04-19T02:57:52Z")

</div>

See [File input plugin | Logstash Reference [8.11] | Elastic](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html#plugins-inputs-file-path)

> Paths must be absolute and cannot be relative.

Also I don't think we allow variables in the inputs like that, only wildcards.

---

<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, 5:01am UTC](https://discuss.elastic.co/t/logstash-input-file/47671/5 "2017-07-06T05:01:44Z")

</div>


