# Is it intended to log errors to stdout while calling the option in the code stderr?

**URL:** <https://discuss.elastic.co/t/is-it-intended-to-log-errors-to-stdout-while-calling-the-option-in-the-code-stderr/33082>\
**Category:** Beats\
**Tags:** beats-development\
**Created:** [October 27, 2015, 2:28pm UTC](https://discuss.elastic.co/t/is-it-intended-to-log-errors-to-stdout-while-calling-the-option-in-the-code-stderr/33082 "2015-10-27T14:28:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrkschan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mrkschan/32/5386_2.png) [@mrkschan](https://discuss.elastic.co/u/mrkschan)\
**Post date:** [October 27, 2015, 2:28pm UTC](https://discuss.elastic.co/t/is-it-intended-to-log-errors-to-stdout-while-calling-the-option-in-the-code-stderr/33082/1 "2015-10-27T14:28:29Z")

</div>

As far as I know, errors and logging outputs are typically sent to stderr instead of stdout and stdout is "reserved" for program output (golang stdlib "log" package sends log line to stderr as well).

At [https://github.com/elastic/libbeat/blob/b360f18e93b6d96d1c1b6c5f37302bb39790197b/logp/log.go#L143](https://github.com/elastic/libbeat/blob/b360f18e93b6d96d1c1b6c5f37302bb39790197b/logp/log.go#L143), the option is stderr but the output is stdout. Is that intentional?

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [October 27, 2015, 3:37pm UTC](https://discuss.elastic.co/t/is-it-intended-to-log-errors-to-stdout-while-calling-the-option-in-the-code-stderr/33082/2 "2015-10-27T15:37:14Z")

</div>

Nice one. Can you add an issue to github?

---

<div class="post-metadata">

**Author:** ![monica](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/monica/32/3696_2.png) [@monica](https://discuss.elastic.co/u/monica)\
**Post date:** [October 27, 2015, 5:00pm UTC](https://discuss.elastic.co/t/is-it-intended-to-log-errors-to-stdout-while-calling-the-option-in-the-code-stderr/33082/3 "2015-10-27T17:00:55Z")

</div>

I created a ticket in GitHub with the requested functionality: [https://github.com/elastic/libbeat/issues/219](https://github.com/elastic/libbeat/issues/219).

---

<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, 9:58pm UTC](https://discuss.elastic.co/t/is-it-intended-to-log-errors-to-stdout-while-calling-the-option-in-the-code-stderr/33082/4 "2017-07-05T21:58:33Z")

</div>


