Issue metadata
Sign in to add a comment
|
--log-net-log doesn't work |
||||||||||||||||||||||||
Issue descriptionI ran a trunk build of Chrome with --log-net-log, and ended up with an invalid log file. Not sure what caused this (could be one of my recent changes). The problem is reproducible for me. Logging via chrome://net-export/ by contrast is resulting in a working log file. If this is a regression should sort it out before M61 branches.
,
Jul 18 2017
The problem is that there are 2 FileNetLogObserver classes being instantiated that write to the same file. The first one is the one I expect: net_log::ChromeNetLog::StartWritingToFile(). However a bit later, there is also: content::NetworkServiceImpl::MojoNetLog::MojoNetLog(). Matt, what is the solution for this? One possibility is to change the command-line used by MojoNetLog so it doesn't trigger in this case. But I don't know much about the NetworkService and how it is expected to co-habitate and share command line flags with Chrome.
,
Jul 18 2017
Oops! I added the in-process bogus NetworkService just last week. My suggestion is to make NetworkService ignore the command line command line flags when creating in-process (When created with NetworkService::Create).
,
Jul 18 2017
This does seem ugly, but I'll need to be adding other magic for that path, too (Like making a NetworkChangeNotifier only when it's out of process. Will need to come up with something prettier long term, though)
,
Jul 18 2017
Is the difference in NetworkService construction that |registry| will be nullptr when doing inprocess/test construction and non-nullptr otherwise? (Looking for where to make the decision to inspect netlog command line flags).
,
Jul 18 2017
It's also nullptr in unit tests, and I suspect we want to construct the full object in unit tests, so I'd suggest a separate constructor for the ::Create path instead (Or add another constructor parameter).
,
Jul 18 2017
,
Jul 18 2017
Eventually, we'll want to always use the one the NetworkService creates, at which point we can get rid of the current ChromeNetLog, but I think that's a bit too much work to worry about now (Logging network changes and net-export are the two big things, off the top of my head, though sure there are others)
,
Jul 18 2017
,
Jul 18 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4eca3b25f42e96ab59dfc0e8c4811ae7d7fad404 commit 4eca3b25f42e96ab59dfc0e8c4811ae7d7fad404 Author: Eric Roman <eroman@chromium.org> Date: Tue Jul 18 21:53:21 2017 Don't write to --log-net-log from MojoNetLog when running in-process. Bug: 745877 Change-Id: I05d3fcdbe55509d808f0ab696b159ca22876a0b8 Reviewed-on: https://chromium-review.googlesource.com/576358 Reviewed-by: Matt Menke <mmenke@chromium.org> Commit-Queue: Eric Roman <eroman@chromium.org> Cr-Commit-Position: refs/heads/master@{#487621} [modify] https://crrev.com/4eca3b25f42e96ab59dfc0e8c4811ae7d7fad404/content/network/network_service_impl.cc
,
Jul 18 2017
,
Nov 7 2017
Apologies, applied the wrong component in bulk. |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by eroman@chromium.org
, Jul 18 2017