From f98472bf42cd190c365800542dc6dd3b7899c71d Mon Sep 17 00:00:00 2001 From: Jelle Foks Date: Wed, 24 Apr 2024 18:01:48 -0700 Subject: [PATCH] Add thread name and number to cobalt log output. (#3051) The default logging items exclude the thread. This enables the thread prefix on the log output. b/223411660 --- cobalt/base/init_cobalt.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cobalt/base/init_cobalt.cc b/cobalt/base/init_cobalt.cc index a22be1ef829..3ab6a912f39 100644 --- a/cobalt/base/init_cobalt.cc +++ b/cobalt/base/init_cobalt.cc @@ -37,6 +37,12 @@ base::LazyInstance::DestructorAtExit::DestructorAtExit void InitCobalt(int argc, char* argv[], const char* link) { base::CommandLine::Init(argc, argv); + + logging::LoggingSettings settings; + settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; + logging::InitLogging(settings); + logging::SetLogItems(false, true, true, false); + if (link) { s_initial_deep_link.Get() = link; }