# Log Warning/Error while parsing pipeline

**URL:** <https://discuss.elastic.co/t/log-warning-error-while-parsing-pipeline/150544>\
**Category:** Logstash\
**Created:** [October 1, 2018, 9:59am UTC](https://discuss.elastic.co/t/log-warning-error-while-parsing-pipeline/150544 "2018-10-01T09:59:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![prometheus1](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@prometheus1](https://discuss.elastic.co/u/prometheus1)\
**Post date:** [October 1, 2018, 9:59am UTC](https://discuss.elastic.co/t/log-warning-error-while-parsing-pipeline/150544/1 "2018-10-01T09:59:25Z")

</div>

I want to achieve logger.error(), logger.info() type functionality without using a ruby filter. Is it possible to do it in logstash.

I shall describe my exact usecase to provide additional clarity:

I have if - else blocks in my logstash filter configurations. In certain situations when say, a field is missing, I need to throw a warning in logstash. In certain cases when a field is missing I need to throw and error and drop the log. How can I achieve this kind of functionality using logstash.

I understand we can do it by using a rubyfilter where we use the logger object to log errors, warnings etc. Is there any way I can do it without that? What do you people suggest on how I should approach my usecase?

---

<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:** [October 29, 2018, 9:59am UTC](https://discuss.elastic.co/t/log-warning-error-while-parsing-pipeline/150544/2 "2018-10-29T09:59:27Z")

</div>

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