When I use 4.3.4 shell to connect to 4.0.16 server I see this in the console:
carbon% mongo --port 14020 {"t":{"$date":"2020-03-18T04:10:34.705Z"},"s":"I", "c":"NETWORK", "id":23014,"ctx":"main","msg":"{foStatus_reason}","attr":{"foStatus_reason":"TCP FastOpen support requested, but disabled in kernel. Set /proc/sys/net/ipv4/tcp_fastopen to 3"}} MongoDB shell version v4.3.4 connecting to: mongodb://127.0.0.1:14020/?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("4f9892ef-1bf7-4416-9e6a-b97f311fa161") } MongoDB server version: 4.0.16 WARNING: shell and server versions do not match Server has startup warnings: 2020-03-18T00:10:26.404-0400 I CONTROL [initandlisten] 2020-03-18T00:10:26.404-0400 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database. 2020-03-18T00:10:26.404-0400 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted. 2020-03-18T00:10:26.404-0400 I CONTROL [initandlisten] 2020-03-18T00:10:26.404-0400 I CONTROL [initandlisten] ** WARNING: This server is bound to localhost. 2020-03-18T00:10:26.404-0400 I CONTROL [initandlisten] ** Remote systems will be unable to connect to this server. 2020-03-18T00:10:26.404-0400 I CONTROL [initandlisten] ** Start the server with --bind_ip <address> to specify which IP 2020-03-18T00:10:26.404-0400 I CONTROL [initandlisten] ** addresses it should serve responses from, or with --bind_ip_all to 2020-03-18T00:10:26.404-0400 I CONTROL [initandlisten] ** bind to all interfaces. If this behavior is desired, start the 2020-03-18T00:10:26.404-0400 I CONTROL [initandlisten] ** server with --bind_ip 127.0.0.1 to disable this warning. 2020-03-18T00:10:26.404-0400 I CONTROL [initandlisten]
The first line of the output, I presume, comes from the shell:
{"t":{"$date":"2020-03-18T04:10:34.705Z"},"s":"I", "c":"NETWORK", "id":23014,"ctx":"main","msg":"{foStatus_reason}","attr":{"foStatus_reason":"TCP FastOpen support requested, but disabled in kernel. Set /proc/sys/net/ipv4/tcp_fastopen to 3"}} MongoDB shell version v4.3.4 connecting to: mongodb://127.0.0.1:14020/?compressors=disabled&gssapiServiceName=mongodb Implicit session: session { "id" : UUID("4f9892ef-1bf7-4416-9e6a-b97f311fa161") }
It is my understanding that the shell is meant to primarily be used by humans rather than be driven by software (the software generally will use a driver rather than the shell). Therefore my expected behavior is:
As a user of the shell, I expect the shell to produce its output in a format that is easily human-readable.
While it is certainly possible for a human to read json server logs, I do not consider them to be in a format that is easy for a human to read (I listed why I do not consider json logs to be easy to read in https://jira.mongodb.org/browse/SERVER-46911).
- is duplicated by
-
SERVER-47362 mongo shell emits replica set monitor messages every 10 seconds
- Closed
- is related to
-
SERVER-46911 Allow logging to pipe
- Closed
- related to
-
SERVER-48100 "mongo" command line in 4.4.0-rc[0-5] prints TCP Fast Open warning to stdout
- Closed