Skip to content

Commit

Permalink
Change codec instance comparison (#69)
Browse files Browse the repository at this point in the history
* Switch from instanceof to string comparision to check the type of codec during regitration

* bump to 3.0.6

---------

Co-authored-by: logstashmachine <[email protected]>
  • Loading branch information
andsel and logstashmachine authored Sep 8, 2023
1 parent 30b8f91 commit 906c1a8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 3.0.6
- Change codec instance comparison [#69](https://github.com/logstash-plugins/logstash-output-syslog/pull/69)

## 3.0.5
- Docs: Set the default_codec doc attribute.

Expand Down
2 changes: 1 addition & 1 deletion lib/logstash/outputs/syslog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def register
@ssl_context = setup_ssl
end

if @codec.instance_of? LogStash::Codecs::Plain
if @codec.class.name == "LogStash::Codecs::Plain"
if @codec.config["format"].nil?
@codec = LogStash::Codecs::Plain.new({"format" => @message})
end
Expand Down
2 changes: 1 addition & 1 deletion logstash-output-syslog.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|

s.name = 'logstash-output-syslog'
s.version = '3.0.5'
s.version = '3.0.6'
s.licenses = ['Apache License (2.0)']
s.summary = "Sends events to a `syslog` server"
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
Expand Down

0 comments on commit 906c1a8

Please sign in to comment.