lib/scalyr/common/client.rb in logstash-output-scalyr-0.2.4.beta vs lib/scalyr/common/client.rb in logstash-output-scalyr-0.2.5.beta

- old
+ new

@@ -303,16 +303,16 @@ # NOTE: zstandard requires libzstd to be installed on the system and # zstandard gem. Since libzstd may not be installed out of the box, we # don't directly depend on this gem and it's up to the user to install # both dependencies manually in case they want to use zstandard. begin - gem 'zstandard' + require 'zstandard' rescue LoadError raise SystemExit, "zstandard gem is missing. If you want to use zstandard compression you need to make sure zstandard and and libzstd dependency is installed. See TODO for more information." end encoding = 'zstandard' - compressed_body = Zstandard.deflate(string) + compressed_body = Zstandard.deflate(body) end end_time = Time.now.to_f compression_duration = end_time - start_time end