Commit 7252722d authored by Tatiana Buldina's avatar Tatiana Buldina Committed by Commit Bot

[ChromeDriver] Move logging to avoid creating additional log file

Bug: chromedriver:2768
Change-Id: I767f85b03941e3b5ff99beae216e08cb7ba40d0a
Reviewed-on: https://chromium-review.googlesource.com/c/1456291Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Commit-Queue: Tatiana Buldina <buldina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#629761}
parent 8478f5a0
......@@ -254,8 +254,6 @@ bool InitLogging() {
printf("Failed to redirect stderr to log file.\n");
return false;
}
VLOG(0) << "Starting ChromeDriver " << kChromeDriverVersion;
VLOG(0) << kPortProtectionMessage;
}
Log::truncate_logged_params = !cmd_line->HasSwitch("replayable");
......@@ -300,7 +298,12 @@ bool InitLogging() {
logging::LoggingSettings logging_settings;
logging_settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
return logging::InitLogging(logging_settings);
bool res = logging::InitLogging(logging_settings);
if (cmd_line->HasSwitch("log-path") && res) {
VLOG(0) << "Starting ChromeDriver " << kChromeDriverVersion;
VLOG(0) << kPortProtectionMessage;
}
return res;
}
Status CreateLogs(
......
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