# Logstash logs

**URL:** <https://discuss.elastic.co/t/logstash-logs/314911>\
**Category:** Logstash\
**Created:** [September 22, 2022, 4:36am UTC](https://discuss.elastic.co/t/logstash-logs/314911 "2022-09-22T04:36:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![irivas95](https://avatars.discourse-cdn.com/v4/letter/i/839c29/32.png) [@irivas95](https://discuss.elastic.co/u/irivas95)\
**Post date:** [September 22, 2022, 4:36am UTC](https://discuss.elastic.co/t/logstash-logs/314911/1 "2022-09-22T04:36:01Z")

</div>

Hi,  
I have installed logstash 7.16.3 with default settings in logstash.yml and log4j2.properties.  
My understanding is that with this configuration each log type, for example, logstash-plain.log should not be able to exceed 30 files. However in my folder /var/log/logstash there are more than double this amount. I would like to be able to configure it to rotate daily and only keep the last 7 days, could someone help me? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [September 22, 2022, 1:07pm UTC](https://discuss.elastic.co/t/logstash-logs/314911/2 "2022-09-22T13:07:17Z")

</div>

[This](https://discuss.elastic.co/t/rotate-and-remove-old-logstash-output-logs/256803) thread may help you.

---

<div class="post-metadata">

**Author:** ![irivas95](https://avatars.discourse-cdn.com/v4/letter/i/839c29/32.png) [@irivas95](https://discuss.elastic.co/u/irivas95)\
**Post date:** [September 29, 2022, 4:39pm UTC](https://discuss.elastic.co/t/logstash-logs/314911/3 "2022-09-29T16:39:23Z")

</div>

Thanks!, it's working.

---

<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:** [October 27, 2022, 4:40pm UTC](https://discuss.elastic.co/t/logstash-logs/314911/4 "2022-10-27T16:40:25Z")

</div>

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