# Logstash ( ver. 6.5.3 ) keep writing logs in /var/log/messages

**URL:** <https://discuss.elastic.co/t/logstash-ver-6-5-3-keep-writing-logs-in-var-log-messages/167271>\
**Category:** Logstash\
**Tags:** elastic-stack-monitoring\
**Created:** [February 6, 2019, 11:06am UTC](https://discuss.elastic.co/t/logstash-ver-6-5-3-keep-writing-logs-in-var-log-messages/167271 "2019-02-06T11:06:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![slapper15](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@slapper15](https://discuss.elastic.co/u/slapper15)\
**Post date:** [February 6, 2019, 11:06am UTC](https://discuss.elastic.co/t/logstash-ver-6-5-3-keep-writing-logs-in-var-log-messages/167271/1 "2019-02-06T11:06:16Z")

</div>

Hello!

I find an issue in logstash regarding internal logging mechanism. For some reason logstash keep writing logs in journal , /var/log/messages & /var/log/logstash/logstash-plain.log (i am using centos 7 system ) . Already check my pipelines and none of them has stdout option enabled.

My case here is that i don't want the logstash to write logs in /var/log/messages. The only way to achieve this is to add the following line in /etc/rsyslog.conf :

`if $programname == 'logstash' then stop`

Is there any better approach to that ?i don't want to mess around with custom options in rsyslog.conf file.

Thanks in advance!

---

<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:** [March 6, 2019, 11:19am UTC](https://discuss.elastic.co/t/logstash-ver-6-5-3-keep-writing-logs-in-var-log-messages/167271/2 "2019-03-06T11:19:49Z")

</div>

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