# Filebeat for rotated logs: the old harvest always is handled before new harvest?

**URL:** <https://discuss.elastic.co/t/filebeat-for-rotated-logs-the-old-harvest-always-is-handled-before-new-harvest/298613>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [March 2, 2022, 11:41am UTC](https://discuss.elastic.co/t/filebeat-for-rotated-logs-the-old-harvest-always-is-handled-before-new-harvest/298613 "2022-03-02T11:41:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![newtofilebeat](https://avatars.discourse-cdn.com/v4/letter/n/3be4f8/32.png) [@newtofilebeat](https://discuss.elastic.co/u/newtofilebeat)\
**Post date:** [March 2, 2022, 11:41am UTC](https://discuss.elastic.co/t/filebeat-for-rotated-logs-the-old-harvest-always-is-handled-before-new-harvest/298613/1 "2022-03-02T11:41:43Z")

</div>

we need use filebeat to collect our application logs but the logs will rotated weekly. The log file is updated every 5 minutes  
My question is: when a.log is rotated to a.log.1 and new file a.log is created, a.log.1 will be always read before a.log? I ask this question because I need keep the order the messages are written. If filebeat reads a.log before a.log1, then the order is incorrect.  
Thanks!

---

<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 30, 2022, 1:41pm UTC](https://discuss.elastic.co/t/filebeat-for-rotated-logs-the-old-harvest-always-is-handled-before-new-harvest/298613/2 "2022-03-30T13:41:59Z")

</div>

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