Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…lugins#65 and logstash-plugins#66

Makes plugin work with mongodb driver, version 2.6 (again)
  • Loading branch information
nilskuhn authored and arichiardi committed Oct 13, 2020
1 parent cea5835 commit e1d3774
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/logstash/outputs/bson/big_decimal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module BigDecimal
# 1.221311.to_bson
# @return [ String ] The encoded string.
# @see http://bsonspec.org/#/specification
def to_bson(buffer = ByteBuffer.new)
def to_bson(buffer = ByteBuffer.new, validating_keys = Config.validating_keys?)
buffer.put_bytes([ self ].pack(PACK))
end

Expand Down
2 changes: 1 addition & 1 deletion lib/logstash/outputs/bson/logstash_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module LogStashEvent
# Event.new("field" => "value").to_bson
# @return [ String ] The encoded string.
# @see http://bsonspec.org/#/specification
def to_bson(buffer = ByteBuffer.new)
def to_bson(buffer = ByteBuffer.new, validating_keys = Config.validating_keys?)
position = buffer.length
buffer.put_int32(0)
to_hash.each do |field, value|
Expand Down
2 changes: 1 addition & 1 deletion lib/logstash/outputs/bson/logstash_timestamp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module LogStashTimestamp
# A time is type 0x09 in the BSON spec.
BSON_TYPE = 9.chr.force_encoding(BINARY).freeze

def to_bson(buffer = ByteBuffer.new)
def to_bson(buffer = ByteBuffer.new, validating_keys = Config.validating_keys?)
time.to_bson(buffer)
end

Expand Down

0 comments on commit e1d3774

Please sign in to comment.