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); |
} |