# Does filebeat re-read the same .log file in a different directory?

**URL:** <https://discuss.elastic.co/t/does-filebeat-re-read-the-same-log-file-in-a-different-directory/290953>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 4, 2021, 12:31pm UTC](https://discuss.elastic.co/t/does-filebeat-re-read-the-same-log-file-in-a-different-directory/290953 "2021-12-04T12:31:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![OAHstasy](https://avatars.discourse-cdn.com/v4/letter/o/c4cdca/32.png) [@OAHstasy](https://discuss.elastic.co/u/OAHstasy)\
**Post date:** [December 4, 2021, 12:31pm UTC](https://discuss.elastic.co/t/does-filebeat-re-read-the-same-log-file-in-a-different-directory/290953/1 "2021-12-04T12:31:59Z")

</div>

Filebeat version: 7.15  
OS: Windows 10

Hello everyone,

Let me give you people a short description about my situtation:

I configured my filebeat to read all .log files in "\path\_to\_logs\logs\ \* \ \*.log." My program that creates logs store daily logs in month-by-month created folders such as "2021-11" or "2021-12".

In "\path\_to\_logs\logs" path, today's logs are stored in app.log. As the system time show 24:00, program moves "app.log" into this month's folder and create new "app.file"for a new day.

My question is, how does filebeat react to previously created "app.log" file in new path?

As I've read from the documentations, I haven't noticed such information.

I would be grateful for all types of support.

---

<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:** [December 7, 2021, 4:05am UTC](https://discuss.elastic.co/t/does-filebeat-re-read-the-same-log-file-in-a-different-directory/290953/2 "2021-12-07T04:05:24Z")

</div>

Welcome to our community! 😃

Basically any file that is in a different path, even if it has the same name, will have a different inode reference on the filesystem and will be treated as a new file.

---

<div class="post-metadata">

**Author:** ![OAHstasy](https://avatars.discourse-cdn.com/v4/letter/o/c4cdca/32.png) [@OAHstasy](https://discuss.elastic.co/u/OAHstasy)\
**Post date:** [December 7, 2021, 7:06am UTC](https://discuss.elastic.co/t/does-filebeat-re-read-the-same-log-file-in-a-different-directory/290953/3 "2021-12-07T07:06:23Z")

</div>

Many thanks!

I wish you a healthy day.

---

<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:** [January 4, 2022, 9:06am UTC](https://discuss.elastic.co/t/does-filebeat-re-read-the-same-log-file-in-a-different-directory/290953/4 "2022-01-04T09:06:45Z")

</div>

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