-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Logging
-
Minor Change
Currently it is hard to automatically parse mongod and mongos logfiles due to little inconsistencies and ambiguities that can easily be fixed.
numYields
Wed Sep 05 18:17:35 [conn106842] getmore test.docs query: { ps: 3 } cursorid:77621193264928 ntoreturn:0 keyUpdates:0 numYields: 7 locks(micros) r:12009 nreturned:1044 reslen:2628447 15ms
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:.
Space before "ms"
Most timed operations print their duration as ###ms (#=digit). Some, however, have a space before the ms.
Wed Sep 05 18:56:05 [DataFileSync] FlushViewOfFile for F:/data/local.3 failed with error 1 after 1 attempts taking 933 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.
read/write lock syntax
The read and write lock microsecond numbers currently have this syntax:
Wed Jun 19 13:48:13.454 [conn2] insert test.docs ninserted:1 keyUpdates:0 locks(micros) w:231001 230ms
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:.
Server Restarted
***** SERVER RESTARTED *****
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.
- is related to
-
SERVER-5092 Better named logging with tracing
- Closed