-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Diagnostics
-
None
-
Minor Change
-
Sharding 2017-12-04, Sharding 2018-01-01, Sharding 2017-12-18, Sharding 2018-01-29, Sharding 2018-02-12
Results from commands are often not available. This means that when commands are logged, if only the logfile is available it is impossible to know whether the command succeeded or failed.
Thus log lines for failed commands should indicate ok:0, and include any errmsg:"..." that was in the command response.
For example, the following situation:
> rs.stepDown() replset:PRIMARY> rs.stepDown() { "closest" : NumberLong(0), "difference" : NumberLong(1434366203), "ok" : 0, "errmsg" : "no secondaries within 10 seconds of my optime" }
should be logged as:
Unable to find source-code formatter for language: diff. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
-2015-06-15T21:39:43.507+1000 [conn8] command admin.$cmd command: replSetStepDown { replSetStepDown: 60.0 } keyUpdates:0 numYields:0 reslen:132 0ms
+2015-06-15T21:39:43.507+1000 [conn8] command admin.$cmd command: replSetStepDown { replSetStepDown: 60.0 } keyUpdates:0 numYields:0 ok:0 errMsg:"no secondaries within 10 seconds of my optime" errName:ExceededTimeLimit errCode:50 reslen:132 0ms
- is duplicated by
-
SERVER-27669 Not all errors are logged
- Closed
- is related to
-
SERVER-20940 Should log createIndexes failure at level 0
- Closed