Chromium Code Reviews| Index: chromecast/app/cast_main_delegate.cc |
| diff --git a/chromecast/app/cast_main_delegate.cc b/chromecast/app/cast_main_delegate.cc |
| index f28ef11ec8217588d95b0fc7163c6cf7c1702a81..768a0bca23baecbc3a08dd3b2d785aaa2d4eac04 100644 |
| --- a/chromecast/app/cast_main_delegate.cc |
| +++ b/chromecast/app/cast_main_delegate.cc |
| @@ -61,20 +61,19 @@ bool CastMainDelegate::BasicStartupComplete(int* exit_code) { |
| RegisterPathProvider(); |
| logging::LoggingSettings settings; |
| + settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
| #if defined(OS_ANDROID) |
| - base::FilePath log_file; |
| - PathService::Get(FILE_CAST_ANDROID_LOG, &log_file); |
| - settings.logging_dest = logging::LOG_TO_ALL; |
| - settings.log_file = log_file.value().c_str(); |
| const base::CommandLine* command_line(base::CommandLine::ForCurrentProcess()); |
| std::string process_type = |
| command_line->GetSwitchValueASCII(switches::kProcessType); |
| - // Only delete the old logs if the current process is the browser process. |
| - // Empty process_type signifies browser process. |
| - settings.delete_old = process_type.empty() ? logging::DELETE_OLD_LOG_FILE |
| - : logging::APPEND_TO_OLD_LOG_FILE; |
| -#else |
| - settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
| + // Browser process logs are recorded for attaching with crash dumps. |
| + if (process_type.empty()) { |
|
slan
2015/08/21 20:12:14
Could we add a note about permissions explaining w
|
| + base::FilePath log_file; |
| + PathService::Get(FILE_CAST_ANDROID_LOG, &log_file); |
| + settings.logging_dest = logging::LOG_TO_ALL; |
| + settings.log_file = log_file.value().c_str(); |
| + settings.delete_old = logging::DELETE_OLD_LOG_FILE; |
| + } |
| #endif // defined(OS_ANDROID) |
| logging::InitLogging(settings); |
| // Time, process, and thread ID are available through logcat. |