[SERVER-18971] Command log lines should include ok: 0 and errmsg:"..." Created: 15/Jun/15 Updated: 01/Feb/18 Resolved: 01/Feb/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Diagnostics |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.2 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kevin Pulo | Assignee: | Kevin Pulo |
| Resolution: | Done | Votes: | 4 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||
| Sprint: | Sharding 2017-12-04, Sharding 2018-01-01, Sharding 2017-12-18, Sharding 2018-01-29, Sharding 2018-02-12 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
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:
should be logged as:
|
| Comments |
| Comment by Githook User [ 01/Feb/18 ] |
|
Author: {'email': 'kevin.pulo@mongodb.com', 'name': 'Kevin Pulo', 'username': 'devkev'}Message: |
| Comment by Githook User [ 01/Feb/18 ] |
|
Author: {'email': 'kevin.pulo@mongodb.com', 'name': 'Kevin Pulo', 'username': 'devkev'}Message: |
| Comment by Kevin Pulo [ 03/Nov/17 ] |
The original intent was to log "ok:1" for successful ops, however the feeling now is more that this should be avoided (ie. only add "ok:0" to failed ops) so as to:
The errmsg will be have redaction applied in the same way as exception messages currently do, which I expect should be sufficient. |
| Comment by David Golden [ 27/Oct/17 ] |
|
Two questions:
|