Open Bug 1073140 Opened 10 years ago Updated 2 years ago

[mozlog] overwrites user specified 'mach' formatter if no sys.stdout loggers found


(Testing :: Mozbase, defect)



(Not tracked)


(Reporter: ahal, Unassigned)


E.g say I run:
python --log-mach path/to/log

If no stdout_loggers are found, will automatically point the 'mach' formatter at sys.stdout [1]. 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 --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.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.