Commit 595d7f66 authored by David Dorwin's avatar David Dorwin Committed by Commit Bot

[fuchsia] Initialize fx_logger_config_t using braces

This is necessary for forwards compatibility with SDK changes and
consistent with most other clients.

Bug: fuchsia:63529
Change-Id: I5dca17d93d0563849c288780fd90317b0ed5f953
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2518131
Auto-Submit: David Dorwin <ddorwin@chromium.org>
Reviewed-by: default avatarWez <wez@chromium.org>
Commit-Queue: David Dorwin <ddorwin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823798}
parent 7bcf21c4
......@@ -392,17 +392,19 @@ bool BaseInitLoggingImpl(const LoggingSettings& settings) {
#if defined(OS_FUCHSIA)
if (g_logging_destination & LOG_TO_SYSTEM_DEBUG_LOG) {
fx_logger_config_t config;
config.min_severity = FX_LOG_INFO;
config.console_fd = -1;
config.log_service_channel = ZX_HANDLE_INVALID;
std::string log_tag = base::CommandLine::ForCurrentProcess()
->GetProgram()
.BaseName()
.AsUTF8Unsafe();
const char* log_tag_data = log_tag.data();
config.tags = &log_tag_data;
config.num_tags = 1;
fx_logger_config_t config = {
.min_severity = FX_LOG_INFO,
.console_fd = -1,
.log_service_channel = ZX_HANDLE_INVALID,
.tags = &log_tag_data,
.num_tags = 1,
};
fx_log_reconfigure(&config);
}
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment