[SERVER-41627] Error/log information is printed to standard output Created: 11/Jun/19  Updated: 27/Oct/23  Resolved: 05/Mar/20

Status: Closed
Project: Core Server
Component/s: Logging
Affects Version/s: 4.1.13
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Oleg Pudeyev (Inactive) Assignee: DO NOT USE - Backlog - Dev Tools
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Developer Tools
Operating System: ALL
Participants:

 Description   

I tried running mongo-orchestration's test suite, and in the process of that mongod died with an error message while not writing anything to its log file. The error output was sent to standard output stream, whereas I expected to find error output in the standard error stream.

This is the config I used, saved as /tmp/c:

nojournal=true
configsvr=true
dbpath=/tmp/mongo-A_fAH5
logpath=/tmp/mongo-A_fAH5/mongod.log

speed% /usr/local/m/versions/4.1/mongod --config /tmp/c --port 1027            
2019-06-10T20:44:21.454-0400 F  CONTROL  [main] Failed global initialization: BadValue: nojournal is not allowed when configsvr is specified

At the end of this execution, /tmp/mongo-A_fAH5/mongod.log did not exist and the error message was printed to stdout.

Checked on master (4.3.0).



 Comments   
Comment by Oleg Pudeyev (Inactive) [ 05/Mar/20 ]

Can a reason/explanation be added to this ticket please?

Writing errors to standard output as far as I know contradicts the convention used by most software on Unix-derived operating systems.

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