Skip to content

Commit 906c1a8

Browse files
Change codec instance comparison (#69)
* 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]>
1 parent 30b8f91 commit 906c1a8

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 3.0.6
2+
- Change codec instance comparison [#69](https://github.com/logstash-plugins/logstash-output-syslog/pull/69)
3+
14
## 3.0.5
25
- Docs: Set the default_codec doc attribute.
36

lib/logstash/outputs/syslog.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def register
132132
@ssl_context = setup_ssl
133133
end
134134

135-
if @codec.instance_of? LogStash::Codecs::Plain
135+
if @codec.class.name == "LogStash::Codecs::Plain"
136136
if @codec.config["format"].nil?
137137
@codec = LogStash::Codecs::Plain.new({"format" => @message})
138138
end

logstash-output-syslog.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Gem::Specification.new do |s|
22

33
s.name = 'logstash-output-syslog'
4-
s.version = '3.0.5'
4+
s.version = '3.0.6'
55
s.licenses = ['Apache License (2.0)']
66
s.summary = "Sends events to a `syslog` server"
77
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"

0 commit comments

Comments
 (0)