[SERVER-46618] Fix unittest logging to BSON Created: 04/Mar/20 Updated: 29/Oct/23 Resolved: 09/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc0, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mark Benvenuto | Assignee: | Mark Benvenuto |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v4.4
|
||||||||
| Participants: | |||||||||
| Linked BF Score: | 28 | ||||||||
| Description |
|
Since boost::log does not work correctly with different formatters per sink, we need to inline the formatter into the sink we use for capturing bson logs in unit tests. boost::log caaches the formatter information in a thread local. See https://github.com/mongodb/mongo/blob/0ef652f6456a46b6e162e147f75ab5cdd05018f5/src/third_party/boost-1.70.0/boost/log/sinks/basic_sink_frontend.hpp#L344-L345
|
| Comments |
| Comment by Githook User [ 11/Mar/20 ] |
|
Author: {'name': 'Mark Benvenuto', 'username': 'markbenvenuto', 'email': 'mark.benvenuto@mongodb.com'}Message: (cherry picked from commit 81f067547869449d47616a84e922959121c0fb85) |
| Comment by Githook User [ 09/Mar/20 ] |
|
Author: {'username': 'markbenvenuto', 'name': 'Mark Benvenuto', 'email': 'mark.benvenuto@mongodb.com'}Message: |