# How do I separate stdout and stderr logs of Logstash service?

**URL:** <https://discuss.elastic.co/t/how-do-i-separate-stdout-and-stderr-logs-of-logstash-service/271393>\
**Category:** Logstash\
**Created:** [April 27, 2021, 2:03pm UTC](https://discuss.elastic.co/t/how-do-i-separate-stdout-and-stderr-logs-of-logstash-service/271393 "2021-04-27T14:03:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hvardhan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hvardhan/32/27795_2.png) [@hvardhan](https://discuss.elastic.co/u/hvardhan)\
**Post date:** [April 27, 2021, 2:03pm UTC](https://discuss.elastic.co/t/how-do-i-separate-stdout-and-stderr-logs-of-logstash-service/271393/1 "2021-04-27T14:03:53Z")

</div>

Logstash is being run using systemd. I have tried adding:  
`StandardError=/ebs/logs/some_error.log` in logstash.service but it doesn't work.  
Also added this in pipelines.yml

```auto
output {
      if [level] == "WARN" {
        file {
          path => "/ebs/logs/logstash/error.log"
          codec => line { format => "%{message}"}
        }
      }
}

```

Any idea how can I separate the error logs of running Logstash service?

---

<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:** [May 25, 2021, 2:04pm UTC](https://discuss.elastic.co/t/how-do-i-separate-stdout-and-stderr-logs-of-logstash-service/271393/2 "2021-05-25T14:04:17Z")

</div>

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