logstash-plugins / logstash-output-mongodb

Apache License 2.0
36 stars 77 forks source link

warning: BigDecimal.new is deprecated; use BigDecimal() method instead. #84

Open jpuskar opened 1 year ago

jpuskar commented 1 year ago

Hi, The mongodb output plugin spams this to the logstash log. I am on mongodb-output-plugin 3.1.7 with logstash 8.7.1. This also happens on logstash 8.6.1.

/opt/bitnami/logstash/vendor/bundle/jruby/2.6.0/gems/logstash-output-mongodb-3.1.7/lib/logstash/outputs/bson/big_decimal.rb:53: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.

Here is my output stanza, for reference:

output {
  mongodb {
    database => "selfservice"
    collection => "%{[Metadata][kafka_topic]}"
    uri => "mongodb://logstash:<password>@mongodb-0.mongodb-svc.shared.svc.cluster.local:27017,mongodb-1.mongodb-svc.shared.svc.cluster.local:27017,mongodb-2.mongodb-svc.shared.svc.cluster.local:27017/admin?replicaSet=mongodb&ssl=true&tlsCAFile=/mnt/certs/ca.crt"
  }
}

It seems like another PR similar to this is needed: https://github.com/logstash-plugins/logstash-output-mongodb/pull/59

senthil13 commented 1 year ago

Its happening in our env also.

logstash-output-mongodb (3.1.5) logstash 8.9.1

Thanks Senthil