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?