stats: Fix flaky TestLogObjectInfo
The test flaky because is was using full log output to deserialize it into a single object holder. But the log was hold two JSON objects: one for the "spawn token acquired" log and another for the "git repo statistic". We change it to use a hook and check the logged data using it.
Closes: #3901 (closed)
Edited by Pavlo Strokov