odygrd / quill

Asynchronous Low Latency C++ Logging Library
MIT License
1.53k stars 157 forks source link

extraneous data written by JSON sink #482

Closed skalexander closed 3 months ago

skalexander commented 3 months ago

Found on 4.4.0, building on MSVC 17.10

After some time, extra JSON elements are added to entries whose message is a plain string.

Attached is single file demo built from the "examples" directory examples

Running this with FileSink sink yields expected output, but with JsonFileSink output is corrupted.

Attached is a zip containing the example, and example .txt and .json output. On the json example, line 67 is the first corrupt output, showing parameters "func" and "b" added to a message that didn't specify them. These appear to be values from a previous logging call in a different function.

example.zip

odygrd commented 3 months ago

Thanks a lot for reporting this. I have added a test case and fixed the bug for the next release