Commit 8a93e523 authored by Yuta Hijikata's avatar Yuta Hijikata Committed by Commit Bot

[logging] Fixes the timing to set log_format

g_log_format has to be set within BaseInitLoggingImpl regardless of the log target.

BUG: None
TEST: base_unittests
Change-Id: I4690d537600eb0eb7e88e897435cf014e013e251
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2417738
Commit-Queue: Yuta Hijikata <ythjkt@chromium.org>
Reviewed-by: default avatarWez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810523}
parent 0310c811
......@@ -365,6 +365,10 @@ bool BaseInitLoggingImpl(const LoggingSettings& settings) {
0u);
#endif
#if defined(OS_CHROMEOS)
g_log_format = settings.log_format;
#endif
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
// Don't bother initializing |g_vlog_info| unless we use one of the
// vlog switches.
......@@ -411,7 +415,6 @@ bool BaseInitLoggingImpl(const LoggingSettings& settings) {
CloseLogFileUnlocked();
#if defined(OS_CHROMEOS)
g_log_format = settings.log_format;
if (settings.log_file) {
DCHECK(!settings.log_file_path);
g_log_file = settings.log_file;
......
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