# Logstash output by condition

**URL:** <https://discuss.elastic.co/t/logstash-output-by-condition/338376>\
**Category:** Logstash\
**Created:** [July 14, 2023, 7:26am UTC](https://discuss.elastic.co/t/logstash-output-by-condition/338376 "2023-07-14T07:26:51Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [July 14, 2023, 9:23am UTC](https://discuss.elastic.co/t/logstash-output-by-condition/338376/2 "2023-07-14T09:23:29Z")

</div>

Hi @tbs575,

Using the [conditional operator](https://discuss.elastic.co/t/if-conditional-with-multiple-outputs/178201), similar to this thread is probably the best approach. It sounds like you've have issues with that approach. Can you give a snippet of what you've tried and if you received a particular error?

---

_[View the full topic](https://discuss.elastic.co/t/logstash-output-by-condition/338376)._
