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

With 'logpath' set in mongodb.conf, even `mongod --help` prints to log file

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: 2.2.2
    • Component/s: Usability
    • Labels:
      None
    • Environment:
      OS X Mountain Lion 10.8.2, installed via Homebrew
    • ALL
    • Hide

      1. Set these in mongodb.conf:

      logpath = /Volumes/Data/Users/stuart/.homebrew/var/log/mongodb/mongo.log
      logappend = true

      2. Run `mongod --help` or `mongod --version` and observe that these commands log to the log file, making the usage hard to find.

      Show
      1. Set these in mongodb.conf: logpath = /Volumes/Data/Users/stuart/.homebrew/var/log/mongodb/mongo.log logappend = true 2. Run `mongod --help` or `mongod --version` and observe that these commands log to the log file, making the usage hard to find.

      I installed MongoDB via Homebrew, and it set me up with a mongodb.conf file that includes:

      1. Append logs to /Volumes/Data/Users/stuart/.homebrew/var/log/mongodb/mongo.log
        logpath = /Volumes/Data/Users/stuart/.homebrew/var/log/mongodb/mongo.log
        logappend = true

      When I went to get usage for the mongod CLI with `mongod --help`, it printed the usage itself to the log file. I would expect usage to be a special case that does not print to the log file even if it is set in the .conf, OR would perhaps print to both stdout and the log file.

      Same goes for the --version option, probably.

            Assignee:
            Unassigned Unassigned
            Reporter:
            stmontgomery Stuart Montgomery
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: