# Rubydebug codec not working

**URL:** <https://discuss.elastic.co/t/rubydebug-codec-not-working/44620>\
**Category:** Logstash\
**Created:** [March 16, 2016, 8:41pm UTC](https://discuss.elastic.co/t/rubydebug-codec-not-working/44620 "2016-03-16T20:41:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tetlika](https://avatars.discourse-cdn.com/v4/letter/t/c6cbf5/32.png) [@tetlika](https://discuss.elastic.co/u/tetlika)\
**Post date:** [March 16, 2016, 8:41pm UTC](https://discuss.elastic.co/t/rubydebug-codec-not-working/44620/1 "2016-03-16T20:41:29Z")

</div>

hi,  
we're using logstash 2.2.2, I have next simple config of logstash:

```
input {
    file {
        path => "/var/log/logstash/logstash.log"
        codec => "rubydebug"
    }
}
output {
     stdout {
        codec => "json"
     }
}

```

When I'm running logstash like this:

```
/opt/logstash/bin/logstash -f logstash.debug.conf

```

on stdout I receive nothing, while /var/log/logstash/logstash.log is changing (new logs coming) . Than, I tryed to launch it in debug mode:

`/opt/logstash/bin/logstash -f logstash.debug.conf --debug`

and receive next:

```
Reading config file {:file=>"logstash/agent.rb", :level=>:debug, :line=>"371", :method=>"local_config"}

          @input_file_1 = plugin("input", "file", LogStash::Util.hash_merge_many({ "path" => ("/var/log/logstash/logstash.log") }, { "codec" => ("rubydebug") }))   
.......
observe_read_file: general error reading /var/log/logstash/logstash.log - error: #<RuntimeError: Not implemented> {:level=>:debug, :file=>"filewatch/observing_tail.rb", :line=>"90", :method=>"observe_read_file"}

```

Can you tell what is wrong here?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 16, 2016, 10:37pm UTC](https://discuss.elastic.co/t/rubydebug-codec-not-working/44620/2 "2016-03-16T22:37:41Z")

</div>

The ruby debug codec is only used for formatting output, and does not even seem to have the method for decoding input implemented. Removing the codec from the file input should therefore remove the problem.

---

<div class="post-metadata">

**Author:** ![tetlika](https://avatars.discourse-cdn.com/v4/letter/t/c6cbf5/32.png) [@tetlika](https://discuss.elastic.co/u/tetlika)\
**Post date:** [March 17, 2016, 6:48am UTC](https://discuss.elastic.co/t/rubydebug-codec-not-working/44620/3 "2016-03-17T06:48:37Z")

</div>

yeah, but logstash log format is not json

what would you suggest to use?

thx

---

<div class="post-metadata">

**Author:** ![Michael\_Korbakov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_korbakov/32/3199_2.png) [@Michael\_Korbakov](https://discuss.elastic.co/u/Michael_Korbakov)\
**Post date:** [March 17, 2016, 11:23am UTC](https://discuss.elastic.co/t/rubydebug-codec-not-working/44620/4 "2016-03-17T11:23:53Z")

</div>

I think that should be mentioned in documentation explicitly. Natural expectation for codec is that it supports both coding and decoding.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 17, 2016, 11:31am UTC](https://discuss.elastic.co/t/rubydebug-codec-not-working/44620/5 "2016-03-17T11:31:19Z")

</div>

Import using the default, plain codec and then use filters e.g. grok, to parse the data.

---

<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:** [July 6, 2017, 5:06am UTC](https://discuss.elastic.co/t/rubydebug-codec-not-working/44620/6 "2017-07-06T05:06:39Z")

</div>


