| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <windows.h> | 5 #include <windows.h> |
| 6 | 6 |
| 7 #include "chrome/installer/util/logging_installer.h" | 7 #include "chrome/installer/util/logging_installer.h" |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 if (installer_logging_) | 31 if (installer_logging_) |
| 32 return; | 32 return; |
| 33 | 33 |
| 34 bool value = false; | 34 bool value = false; |
| 35 if (prefs.GetBool(installer::master_preferences::kDisableLogging, | 35 if (prefs.GetBool(installer::master_preferences::kDisableLogging, |
| 36 &value) && value) { | 36 &value) && value) { |
| 37 installer_logging_ = true; | 37 installer_logging_ = true; |
| 38 return; | 38 return; |
| 39 } | 39 } |
| 40 | 40 |
| 41 logging::InitLogging( | 41 logging::InitLogging(GetLogFilePath(prefs).value().c_str(), |
| 42 GetLogFilePath(prefs).value().c_str(), | 42 logging::LOG_ONLY_TO_FILE, |
| 43 logging::LOG_ONLY_TO_FILE, | 43 logging::LOCK_LOG_FILE, |
| 44 logging::LOCK_LOG_FILE, | 44 logging::DELETE_OLD_LOG_FILE); |
| 45 logging::DELETE_OLD_LOG_FILE, | |
| 46 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); | |
| 47 | 45 |
| 48 if (prefs.GetBool(installer::master_preferences::kVerboseLogging, | 46 if (prefs.GetBool(installer::master_preferences::kVerboseLogging, |
| 49 &value) && value) { | 47 &value) && value) { |
| 50 logging::SetMinLogLevel(logging::LOG_VERBOSE); | 48 logging::SetMinLogLevel(logging::LOG_VERBOSE); |
| 51 } else { | 49 } else { |
| 52 logging::SetMinLogLevel(logging::LOG_ERROR); | 50 logging::SetMinLogLevel(logging::LOG_ERROR); |
| 53 } | 51 } |
| 54 | 52 |
| 55 // Enable ETW logging. | 53 // Enable ETW logging. |
| 56 logging::LogEventProvider::Initialize(kSetupTraceProvider); | 54 logging::LogEventProvider::Initialize(kSetupTraceProvider); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 77 FilePath log_path; | 75 FilePath log_path; |
| 78 if (PathService::Get(base::DIR_TEMP, &log_path)) { | 76 if (PathService::Get(base::DIR_TEMP, &log_path)) { |
| 79 log_path = log_path.Append(log_filename); | 77 log_path = log_path.Append(log_filename); |
| 80 return log_path; | 78 return log_path; |
| 81 } else { | 79 } else { |
| 82 return FilePath(log_filename); | 80 return FilePath(log_filename); |
| 83 } | 81 } |
| 84 } | 82 } |
| 85 | 83 |
| 86 } // namespace installer | 84 } // namespace installer |
| OLD | NEW |