I put the following code in ShardLocal::_runCommand:
The actual location and contents of that log line is probably irrelevant (other than that it contains a stacktrace).
And I have a python script that parses each of those log lines.
But sometimes, the logged message is invalid JSON. There is an issue with the "stacktrace" field of the JSON string. Each time there is an error with it, the JSON object has a field that is
I have attached an example of an invalid log line
Discussion on it here