[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:
Backports
Depends
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: SERVER-46618 Fix unittest logging to BSON

(cherry picked from commit 81f067547869449d47616a84e922959121c0fb85)
Branch: v4.4
https://github.com/mongodb/mongo/commit/59dec614e7a5b103f1ef05cc87b8e112e429ccd6

Comment by Githook User [ 09/Mar/20 ]

Author:

{'username': 'markbenvenuto', 'name': 'Mark Benvenuto', 'email': 'mark.benvenuto@mongodb.com'}

Message: SERVER-46618 Fix unittest logging to BSON
Branch: master
https://github.com/mongodb/mongo/commit/81f067547869449d47616a84e922959121c0fb85

Generated at Thu Feb 08 05:11:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.