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

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

      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.}}

            Assignee:
            daniel.hatcher@mongodb.com Danny Hatcher (Inactive)
            Reporter:
            fvbetteraey@web.de Franz van Betteraey
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: