diff --git a/lib/logging/mongodb.rb b/lib/logging/mongodb.rb index ca6b575d3..900e07f15 100644 --- a/lib/logging/mongodb.rb +++ b/lib/logging/mongodb.rb @@ -92,7 +92,7 @@ def out(target, status, results) else Helper::utf8_elements!(foo) # convert foo to utf-8 flatten_elements!(foo) - @coll.insert_one(foo) + @coll.replace_one({ target: foo[:target]}, foo, { upsert: true}) end end end