Skip to content

Commit

Permalink
Cherry pick PR #3051: Add thread name and number to cobalt log output. (
Browse files Browse the repository at this point in the history
#3073)

Refer to the original PR: #3051

The default logging items exclude the thread. This enables the thread
prefix on the log output.

b/223411660

Co-authored-by: Jelle Foks <jfoks@google.com>
  • Loading branch information
cobalt-github-releaser-bot and jellefoks authored Apr 25, 2024
1 parent d6731f8 commit e5e4e33
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cobalt/base/init_cobalt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ base::LazyInstance<std::string>::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;
}
Expand Down

0 comments on commit e5e4e33

Please sign in to comment.