The current requirements for logging of tools are:
1. Suppress certain log message (--quiet)
2. Change whether certain messages are going to stdout or stderr to avoid smashing output going to stdout.
3. Multiple different log streams (for fatal errors or just informational messages)
4. Log levels (-vvvv)
5. Redirect log output to file
The only things supported by the current server logging framework are 4 and 5.
The logging framework for the server is currently used in some places in the tools, but only inconsistently since it is not adequate for all cases.
Also note that the tools are tightly integrated with the server, which means that code in the tools can call into server code that uses the existing logging framework. This is a problem because in some cases the tools want to send log messages only to stderr, which isn't supported right now by the existing logging framework used by the server.
- is related to
TOOLS-152 Tools should provide way to redirect log output to a file.
SERVER-2011 mongodump, bsondump and mongoexport should only write to stderr in case of a serious error
- related to
SERVER-3112 mongo* tools logs should not log to stdout (broken w/--out -)
SERVER-9282 Audit tools for correct handling of log output