AppShell needs a switch to override the log file path. I was surprised to see that Chrome and content_shell don't already have one I could reuse.
Chrome's log file depends on runtime factors, including the environmental variable CHROME_FILE_FILE [1]. Env vars might make sense for bots, but aren't as convenient or intuitive for developers, IMO. Meanwhile, app_shell and content_shell do not allow their logging paths to be overridden.
I'd like to add a switch to //content that overrides the log file path for these binaries. Following the existing log switches there, the name should begin with "log-", so I propose "log-file". [2] Each binary would still apply its own logic (on Chrome OS we often shouldn't log to the specified log file), and we'd keep the env var for Chrome, but we would use kLogFile when possible.
I'd be interested in any comments or objections. I'm specifically curious why this hasn't been done or discussed before. Perhaps the env var is a better option, but why?
-Michael
(We could bikeshed over -file vs -path, but we have enough examples of both. "file" wins in my mind because it implies that the value is a filename.)