# Elastic - log rotation

**URL:** <https://discuss.elastic.co/t/elastic-log-rotation/47185>\
**Category:** Elasticsearch\
**Created:** [April 13, 2016, 4:49am UTC](https://discuss.elastic.co/t/elastic-log-rotation/47185 "2016-04-13T04:49:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ben1984](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@ben1984](https://discuss.elastic.co/u/ben1984)\
**Post date:** [April 13, 2016, 4:49am UTC](https://discuss.elastic.co/t/elastic-log-rotation/47185/1 "2016-04-13T04:49:01Z")

</div>

Hi,

I'm using elastic 2.1 .  
When I run the ElasticSearch, after a while the log files take all the free space in / and the node goes down...

The logs are already in a rotating file mode. Meaning, every day there is a new log file.

I want to configure the logs to be zipped and deleted automatically.

Can I use logging.yml file to do it?  
Is there any other way to do it using the elasticsearch configuration?

Regards,  
Ben

---

<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 13, 2016, 6:13am UTC](https://discuss.elastic.co/t/elastic-log-rotation/47185/2 "2016-04-13T06:13:34Z")

</div>

Why are they taking up so much space?

---

<div class="post-metadata">

**Author:** ![ben1984](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@ben1984](https://discuss.elastic.co/u/ben1984)\
**Post date:** [April 14, 2016, 1:52pm UTC](https://discuss.elastic.co/t/elastic-log-rotation/47185/3 "2016-04-14T13:52:10Z")

</div>

I'm using a component that writes to the log files.  
I decreased the trace level but I still have a problem with the log size.  
Is it possible to delete and zip old logs?

---

<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 14, 2016, 11:00pm UTC](https://discuss.elastic.co/t/elastic-log-rotation/47185/4 "2016-04-14T23:00:40Z")

</div>

Yeah, it just uses log4j, so you can use it's standard rotation methods.

---

<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 5, 2017, 10:59pm UTC](https://discuss.elastic.co/t/elastic-log-rotation/47185/5 "2017-07-05T22:59:04Z")

</div>


