Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-38385

--quiet mongo shell option does not silence output when connecting to Replica Set

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Duplicate
    • Affects Version/s: 3.4.10
    • Fix Version/s: None
    • Component/s: Shell
    • Labels:
    • Environment:
      Linux

      Description

      When execution a mongo shell script with the --quite option like this

      > mongo --nodb --quiet myScript.js

      the connection output is hidden when using the following connection commands in the script

      // connect to database in script via
      {{ var conn = new Mongo("myHost:27017");}}
      {{ var db = conn.getDB("myDb");}}
      {{  }}
      {{ Unfortunately the (enhanced) output is not hidden when connecting to a Replica Set via}}
      {{  }}
      {{ var conn = new Mongo("mongodb://myHost01:27017,myHost02:27017,myHost03:27017/myDb?replicaSet=myDb-rs);}}
      {{ var db = conn.getDB("myDb");}}
      {{ or }}
      {{ var db = connect("mongodb://myHost01:27017,myHost02:27017,myHost03:27017/myDb?replicaSet=myDb-rs");}}
      {{  }}
      {{ I would have expected that all the output that is done via connecting to a Replica Set would be hidden too.}}

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: