[SERVER-45222] ShardingTest doesn't show logs on stdout Created: 18/Dec/19  Updated: 29/Oct/23  Resolved: 23/Mar/20

Status: Closed
Project: Core Server
Component/s: Logging, Shell
Affects Version/s: 4.3.2, 4.3.3
Fix Version/s: 4.4.0-rc0, 4.7.0

Type: Bug Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Henrik Edin
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
Operating System: ALL
Backport Requested:
v4.4
Steps To Reproduce:

Open a mongo shell:
mongo --nodb
Instantiate a cluster:
cl = ShardingTest({});

Connect to the mongos through another shell and run this command:
db.adminCommand({ setParameter: 1, logComponentVerbosity: { replication: { heartbeats: 0}}});

In the mongos log output you should see an entry like this:
2019-12-18T09:39:46.523+0000 I COMMAND [conn7] successfully set parameter logComponentVerbosity to ...
 

Sprint: Dev Tools 2020-02-10, Dev Tools 2020-02-24, Dev Tools 2020-03-09, Dev Tools 2020-03-23
Participants:

 Description   

After the creation of a ShardingTest() on the mongo shell logs for all the spawned processes of the cluster are supposed to be redirected to the stdout of the console on which ShardingTest has been executed.
Currently I'm only able to see logs of the components during the startup and shutdown phase of ShardingTest(), but not at runtime.



 Comments   
Comment by Githook User [ 26/Mar/20 ]

Author:

{'name': 'Henrik Edin', 'username': 'henrikedin', 'email': 'henrik.edin@mongodb.com'}

Message: SERVER-45222 Fix so the ProgramMultiplexer can output while the shell is waiting for input.

(cherry picked from commit 743076c7047ddbbda8ef6aec55ead1ad3769030b)
Branch: v4.4
https://github.com/mongodb/mongo/commit/ce16388959ec9f92c3221400d0deb70f9772ea0a

Comment by Githook User [ 20/Mar/20 ]

Author:

{'email': 'henrik.edin@mongodb.com', 'name': 'Henrik Edin', 'username': 'henrikedin'}

Message: SERVER-45222 Fix so the ProgramMultiplexer can output while the shell is waiting for input.
Branch: master
https://github.com/mongodb/mongo/commit/743076c7047ddbbda8ef6aec55ead1ad3769030b

Comment by Tommaso Tocci [ 06/Feb/20 ]

I confirm that the bug is still present on 4.3.3

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