When working on out-of-process mojo services it can be hard to figure out which log line comes from which process. Often both the browser process and the remote process are running similar shared components (e.g. code in //ui/views for out-of-process). Trying to back-correlate pids with process types is really awkward and it's easy to mistake which process is doing what.
For example, it doesn't really "pop out" that one of these log lines comes from a non-browser process:
[80335:80335:0730/151208.282787:ERROR:remote_text_input_client.cc(102)] Not implemented reached in virtual bool RemoteTextInputClient::GetTextRange(gfx::Range *) const
[80335:80335:0730/151208.282821:ERROR:remote_text_input_client.cc(157)] Not implemented reached in virtual void RemoteTextInputClient::EnsureCaretNotInRect(const gfx::Rect &)
[80672:80672:0730/151208.285440:ERROR:layer_tree_host_impl.cc(2982)] Forcing zero-copy tile initialization as worker context is missing
[80335:80335:0730/151232.422337:ERROR:textfield.cc(1763)] Not implemented reached in virtual bool views::Textfield::ShouldDoLearning()
[80335:80335:0730/151255.747172:ERROR:device_event_log_impl.cc(159)] [15:12:55.747] Network: network_connection_handler.cc:98 Connect Failure: passphrase-required: /service/wifi2
[80335:80335:0730/151255.747226:ERROR:device_event_log_impl.cc(159)] [15:12:55.747] Network: network_connect.cc:194 Connect Failed: passphrase-required For: wifi2_guid
Add an optional "log tag" that prints as a prefix to log lines. Initially we can just use this for out-of-process mojo services, like the shortcut viewer app. The above would become:
[80335:80335:0730/151208.282821:ERROR:remote_text_input_client.cc(157)] Not implemented reached in virtual void RemoteTextInputClient::EnsureCaretNotInRect(const gfx::Rect &)
[shortcut_viewer:80672:80672:0730/151208.285440:ERROR:layer_tree_host_impl.cc(2982)] Forcing zero-copy tile initialization as worker context is missing
[80335:80335:0730/151232.422337:ERROR:textfield.cc(1763)] Not implemented reached in virtual bool views::Textfield::ShouldDoLearning()
Comment 1 by bugdroid1@chromium.org
, Aug 1