Currently it is hard to automatically parse mongod and mongos logfiles due to little inconsistencies and ambiguities that can easily be fixed.
Most counters like ntoreturn:1, nreturned:1, ... have no space after the colon, but numYields: 1 does have a space after the colon, making its value a separate token when splitting the line on spaces. Please remove the space after numYields:.
Most timed operations print their duration as ###ms (#=digit). Some, however, have a space before the ms.
Please remove the space. As this is a counter like the ones above, it would also make sense to replace this with duration:### instead for consistency.
The read and write lock microsecond numbers currently have this syntax:
The w: is ambiguous with for example the getlasterror command with write concern. The actual indicator locks(micros) is a separate and not very useful token.
Suggestion: remove the locks(micros) and rename the actual w: and r: labels to wlock: and rlock:.
Instead of the two empty lines before and after the server restarted messages, it should be in one single line, with a date and time like all the other lines.
These are trivial changes but would be very useful for machine parsing.