Open Bug 1073140 Opened 7 years ago
.py overwrites user specified 'mach' formatter if no sys .stdout loggers found
E.g say I run: python foo.py --log-mach path/to/log If no stdout_loggers are found, commandline.py will automatically point the 'mach' formatter at sys.stdout . However, this overwrites the user specified logfile. So in the above example, no output appears in 'path/to/log'. The workaround is to explicitly pass in a stdout_logger on the command line: python foo.py --log-mach path/to/log --log-mach -. In my case, I'm setting up a daemon and don't want anything logged to stdout. I question whether we should be setting this up automatically at all (assuming the user passes in a file).. though I guess it doesn't really hurt.  http://dxr.mozilla.org/mozilla-central/source/testing/mozbase/mozlog/mozlog/structured/commandline.py#175
You need to log in before you can comment on or make changes to this bug.