[SERVER-13367] Specialize operator<<(std::ostream&, BSONType) Created: 26/Mar/14 Updated: 02/Sep/16 Resolved: 15/Aug/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code, Usability |
| Affects Version/s: | None |
| Fix Version/s: | 3.3.12 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Mathias Stearn | Assignee: | Adam Chelminski (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Sprint: | Platforms 2016-08-26 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
We could make it print the type names rather than (or in addition to) the number. Right now, it requires extra effort to produce good error and log messages and it is often skipped. |
| Comments |
| Comment by Githook User [ 15/Aug/16 ] |
|
Author: {u'username': u'adamchel', u'name': u'Adam Chelminski', u'email': u'adam.chelminski@mongodb.com'}Message: |
| Comment by Mathias Stearn [ 14/Jan/15 ] |
|
schwerin, I don't think enum classes can have methods. Also I hold out hope of logging one day working with streaming rather than requiring toString() methods. I actually don't think it would be too hard to make it support both. |
| Comment by Andy Schwerin [ 14/Jan/15 ] |
|
redbeard0531, since the logging system (mysteriously) does not use std::ostream by default, but rather uses LogstreamBuilder, maybe we could turn BSONType into an enum class and give it a toString() method? |