# "logstash-output-gelf" plugin not working with "logstash-5.0.0"

**URL:** https://discuss.elastic.co/t/logstash-output-gelf-plugin-not-working-with-logstash-5-0-0/64575
**Category:** Logstash
**Created:** [November 1, 2016, 3:07pm UTC](https://discuss.elastic.co/t/logstash-output-gelf-plugin-not-working-with-logstash-5-0-0/64575 "2016-11-01T15:07:35Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Bragolgirith](https://avatars.discourse-cdn.com/v4/letter/b/df705f/32.png) [@Bragolgirith](https://discuss.elastic.co/u/Bragolgirith)
#### Post date: [November 1, 2016, 3:07pm UTC](https://discuss.elastic.co/t/logstash-output-gelf-plugin-not-working-with-logstash-5-0-0/64575/1 "2016-11-01T15:07:35Z")

</div>

I'm trying to forward a log file by using `logstash-5.0.0` with the `logstash-output-gelf-3.1.1` plugin on Windows 7 and get the following error:

```
[2016-10-28T14:52:17,756][INFO][logstash.pipeline] Pipeline main started
[2016-10-28T14:52:17,817][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=>9600}
[2016-10-28T14:52:18,594][FATAL][logstash.runner] An unexpected error occurred! {:error=>#<NameError: no method 'debug' for arguments (org.jruby.RubyArray,org.jruby.RubyHash) on Java::OrgApacheLoggingLog4jCore::Logger
  available overloads:
    (org.apache.logging.log4j.Marker,java.lang.String,java.lang.Object[])
    (org.apache.logging.log4j.Marker,java.lang.String,org.apache.logging.log4j.util.Supplier[])
    (java.lang.String,org.apache.logging.log4j.util.Supplier[])
    (java.lang.String,java.lang.Object[])>, :backtrace=>["C:/SDKs/logstash-5.0.0/logstash-core/lib/logstash/logging/logger.rb:41:in `debug'", "C:/SDKs/logstash-5.0.0/vendor/bundle/jruby/1.9/gems/logstash-output-gelf-3.1.1/lib/logstash/outputs/gelf.rb
:190:in `receive'", "C:/SDKs/logstash-5.0.0/logstash-core/lib/logstash/outputs/base.rb:92:in `multi_receive'", "org/jruby/RubyArray.java:1613:in `each'", "C:/SDKs/logstash-5.0.0/logstash-core/lib/logstash/outputs/base.rb:92:in `multi_receive'", "C:/S
DKs/logstash-5.0.0/logstash-core/lib/logstash/output_delegator_strategies/legacy.rb:19:in `multi_receive'", "C:/SDKs/logstash-5.0.0/logstash-core/lib/logstash/output_delegator.rb:42:in `multi_receive'", "C:/SDKs/logstash-5.0.0/logstash-core/lib/logst
ash/pipeline.rb:297:in `output_batch'", "org/jruby/RubyHash.java:1342:in `each'", "C:/SDKs/logstash-5.0.0/logstash-core/lib/logstash/pipeline.rb:296:in `output_batch'", "C:/SDKs/logstash-5.0.0/logstash-core/lib/logstash/pipeline.rb:252:in `worker_loo
p'", "C:/SDKs/logstash-5.0.0/logstash-core/lib/logstash/pipeline.rb:225:in `start_workers'"]}

```

My `.conf` file looks like this:

```
input { 
  file {...}
}

output {
  gelf {
    host => "199.99.99.179"
    port => 12203
  }
}

```

It seems to be caused by a version mismatch between `logstash` and the `logstash-output-gelf` plugin as the same configuration works fine with `logstash-2.4.0`.  
Perhaps the output plugin needs to be updated for 5.0.0?

---

<div class="post-metadata">

### Author: ![jsvd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsvd/32/6203_2.png) [@jsvd](https://discuss.elastic.co/u/jsvd)
#### Post date: [November 2, 2016, 11:32am UTC](https://discuss.elastic.co/t/logstash-output-gelf-plugin-not-working-with-logstash-5-0-0/64575/2 "2016-11-02T11:32:54Z")

</div>

we changed the logging infrastructure in 5.0.0 to log4j2, and while we did work to mimmic the API, apparently the previous logging framework (Cabin) allowed the logging of an array object, while the new one doesn't (see [https://github.com/logstash-plugins/logstash-output-gelf/blob/master/lib/logstash/outputs/gelf.rb#L190](https://github.com/logstash-plugins/logstash-output-gelf/blob/master/lib/logstash/outputs/gelf.rb#L190))

This should be easy to fix, replacing  
@logger.debug(["Sending GELF event", m])  
with  
@logger.debug("Sending GELF event", :event =\> m)

---

<div class="post-metadata">

### Author: ![jsvd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsvd/32/6203_2.png) [@jsvd](https://discuss.elastic.co/u/jsvd)
#### Post date: [November 2, 2016, 11:34am UTC](https://discuss.elastic.co/t/logstash-output-gelf-plugin-not-working-with-logstash-5-0-0/64575/3 "2016-11-02T11:34:57Z")

</div>

I opened [https://github.com/logstash-plugins/logstash-output-gelf/issues/20](https://github.com/logstash-plugins/logstash-output-gelf/issues/20) for this problem

---

<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, 4:31am UTC](https://discuss.elastic.co/t/logstash-output-gelf-plugin-not-working-with-logstash-5-0-0/64575/4 "2017-07-06T04:31:32Z")

</div>


