On Linux/Mac, server daemons support setting the log path to /dev/null via the log path:
> mongod --logpath /dev/null
The equivalent invocation fails on Windows:
> mongod --logpath NUL Failed global initialization: FileRenameFailed Could not rename preexisting log file "C:\Projects\MongoDb\dist-test\bin\NUL" to "C:\Projects\MongoDb\dist-test\bin\NUL.2020-03-02T12-45-03"; run with --logappend or manually remove file: Cannot create a file when that file already exists
You can work around this by using log append:
> mongod --logappend --logpath NUL
One other small behavioral difference: on WIndows that invocation produces no output. But on OS X you get one line of output:
~$ mongod --logappend --logpath /dev/null 2020-03-02T09:11:33.735-0500 I CONTROL [main] ***** SERVER RESTARTED *****