# Write only errors log level on logstash-plain.log

**URL:** <https://discuss.elastic.co/t/write-only-errors-log-level-on-logstash-plain-log/252810>\
**Category:** Logstash\
**Created:** [October 21, 2020, 9:00am UTC](https://discuss.elastic.co/t/write-only-errors-log-level-on-logstash-plain-log/252810 "2020-10-21T09:00:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbviz](https://avatars.discourse-cdn.com/v4/letter/d/e19b73/32.png) [@dbviz](https://discuss.elastic.co/u/dbviz)\
**Post date:** [October 21, 2020, 9:00am UTC](https://discuss.elastic.co/t/write-only-errors-log-level-on-logstash-plain-log/252810/1 "2020-10-21T09:00:53Z")

</div>

Hi guys,

I have lot of informations in my logstash-plain and the size can be increased to xx Gb.

I thought about two solutions :

- First, I noticed that my logstash-plain.log contains x days informations, the solution is to make and archive the log every 1 day.

- 2nd solution, is to save only ERROR log level on my logstash plain.

I tried to edit the logstash.yml by adding **log.level: error** but nothing happened.

What's the best solution ?

Thanks

---

<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:** [October 21, 2020, 2:55pm UTC](https://discuss.elastic.co/t/write-only-errors-log-level-on-logstash-plain-log/252810/2 "2020-10-21T14:55:14Z")

</div>

If you want to adjust the level of logging by log4j then you should be changing the [log4j2.properties file](https://www.elastic.co/guide/en/logstash/current/logging.html).

---

<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:** [November 18, 2020, 2:55pm UTC](https://discuss.elastic.co/t/write-only-errors-log-level-on-logstash-plain-log/252810/3 "2020-11-18T14:55:25Z")

</div>

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