# Logging too much information

**URL:** <https://discuss.elastic.co/t/logging-too-much-information/93049>\
**Category:** Elasticsearch\
**Created:** [July 13, 2017, 3:16pm UTC](https://discuss.elastic.co/t/logging-too-much-information/93049 "2017-07-13T15:16:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![iluvcode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/iluvcode/32/24929_2.png) [@iluvcode](https://discuss.elastic.co/u/iluvcode)\
**Post date:** [July 13, 2017, 3:16pm UTC](https://discuss.elastic.co/t/logging-too-much-information/93049/1 "2017-07-13T15:16:54Z")

</div>

We currently deployed Elasticsearch 5.3 to QA site with default log4j2.properties that came with the package.  
Within a week Elasticsearch log files exceeded 260 GB of space which crashed the server.  
How can i delete the log files which are older then 3 days and also limit the size of files?

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [July 21, 2017, 1:56pm UTC](https://discuss.elastic.co/t/logging-too-much-information/93049/2 "2017-07-21T13:56:47Z")

</div>

Since ES just uses log4j2, you can configure the logging to do periodic log rollover via log4j2's config. Or use an external tool like `logrotate`, etc

---

<div class="post-metadata">

**Author:** ![iluvcode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/iluvcode/32/24929_2.png) [@iluvcode](https://discuss.elastic.co/u/iluvcode)\
**Post date:** [July 21, 2017, 5:25pm UTC](https://discuss.elastic.co/t/logging-too-much-information/93049/3 "2017-07-21T17:25:23Z")

</div>

@polyfractal : I upgraded Elasticsearch from v1.7.1 to ES 5.3. In v1.7.1 , we used maxbackupindex and set to 7 to delete the log files that are older then 7 days.  
How can we configure log4j2 to delete the old log files ?

---

<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:** [August 18, 2017, 5:25pm UTC](https://discuss.elastic.co/t/logging-too-much-information/93049/4 "2017-08-18T17:25:27Z")

</div>

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