# Ruby Filter: Getting more info for logstash.filters.ruby errors

**URL:** <https://discuss.elastic.co/t/ruby-filter-getting-more-info-for-logstash-filters-ruby-errors/118831>\
**Category:** Logstash\
**Created:** [February 7, 2018, 11:43am UTC](https://discuss.elastic.co/t/ruby-filter-getting-more-info-for-logstash-filters-ruby-errors/118831 "2018-02-07T11:43:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vicpav](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@vicpav](https://discuss.elastic.co/u/vicpav)\
**Post date:** [February 7, 2018, 11:43am UTC](https://discuss.elastic.co/t/ruby-filter-getting-more-info-for-logstash-filters-ruby-errors/118831/1 "2018-02-07T11:43:57Z")

</div>

The Logstash 5.6.7 logging pipeline in use has about 50 conditionals inside the filter, most of them resulting in data manipulations through Ruby codes in a form

```auto
if <something> {
   ruby {
      code => ”
         <ruby_code_here>
      "
   }
}

```

That works just fine but every now and then Logstash fails and it logs a cryptic message

```auto
10:00:19.809 [[main]>worker1] ERROR logstash.filters.ruby - Ruby exception occurred: can't convert String into Integer

```

The trouble is that none of the Ruby fragments implicitly performs a `.to_i` operation and the source message is not logged. `log4j2.properties` file contains

```auto
log4j.appender.console.type=Console
log4j.appender.console.layout=net.logstash.log4j.JSONEventLayoutV1
log4j.rootLogger=INFO, console

```

Increasing rootLogger `INFO` -\> `DEBUG` just jams whole logging pipeline.

Is it possible to get more information where Logstash was applying the Ruby filter and what was the source message? Thanks a lot!

---

<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 7, 2018, 11:43am UTC](https://discuss.elastic.co/t/ruby-filter-getting-more-info-for-logstash-filters-ruby-errors/118831/2 "2018-03-07T11:43:58Z")

</div>

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