[SERVER-36621] A call to log() in capi_test.cpp does not print to stdout Created: 13/Aug/18  Updated: 29/Oct/23  Resolved: 12/Sep/18

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.0.3, 4.1.3

Type: Improvement Priority: Major - P3
Reporter: Misha Tyulenev Assignee: Andrew Morrow (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.0
Sprint: Platforms 2018-09-24
Participants:

 Description   

Adding log() << "test" does not print anything to stdout in capi_test.cpp . Its a minor inconvenience when investigating mongo_embedded_capi_test unittest failures.



 Comments   
Comment by Githook User [ 12/Sep/18 ]

Author:

{'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}

Message: SERVER-36621 Make embedded tests log to stdout

(cherry picked from commit eabedc300dcef3ce7546a098d5568483840e5759)
Branch: v4.0
https://github.com/mongodb/mongo/commit/d06e99f7e0115bb99a012fb1256b886ca243f97f

Comment by Githook User [ 12/Sep/18 ]

Author:

{'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}

Message: SERVER-36621 Make embedded tests log to stdout
Branch: master
https://github.com/mongodb/mongo/commit/eabedc300dcef3ce7546a098d5568483840e5759

Comment by Andrew Morrow (Inactive) [ 12/Sep/18 ]

Confirmed. This is because we default construct the library with the 'no-action' log callback configuration: https://github.com/mongodb/mongo/blob/master/src/mongo/embedded/capi_test.cpp#L104

Changing that to MONGO_EMBEDDED_V1_LOG_STDOUT causes log data to be generated. We should make that change and backport it.

Generated at Thu Feb 08 04:43:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.