Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Unified Diff: headless/lib/headless_content_main_delegate.cc

Issue 2675853002: headless: Don't delete log files in child processes (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « headless/app/headless_shell_switches.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/lib/headless_content_main_delegate.cc
diff --git a/headless/lib/headless_content_main_delegate.cc b/headless/lib/headless_content_main_delegate.cc
index 5718a27375fcf83a63120c0f4ff9e6f6cc8eb517..98c3076357f1ec4c7597bc6497ab85818c11831d 100644
--- a/headless/lib/headless_content_main_delegate.cc
+++ b/headless/lib/headless_content_main_delegate.cc
@@ -113,10 +113,14 @@ void HeadlessContentMainDelegate::InitLogging(
log_path = log_filename;
}
+ const std::string process_type =
+ command_line.GetSwitchValueASCII(switches::kProcessType);
+
settings.logging_dest = log_mode;
settings.log_file = log_path.value().c_str();
settings.lock_log = logging::DONT_LOCK_LOG_FILE;
- settings.delete_old = logging::DELETE_OLD_LOG_FILE;
+ settings.delete_old = process_type.empty() ? logging::DELETE_OLD_LOG_FILE
+ : logging::APPEND_TO_OLD_LOG_FILE;
bool success = logging::InitLogging(settings);
DCHECK(success);
}
« no previous file with comments | « headless/app/headless_shell_switches.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698