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(GetLogFilePath(prefs).value().c_str(), | 41 logging::InitLogging( |
42 logging::LOG_ONLY_TO_FILE, | 42 GetLogFilePath(prefs).value().c_str(), |
43 logging::LOCK_LOG_FILE, | 43 logging::LOG_ONLY_TO_FILE, |
44 logging::DELETE_OLD_LOG_FILE); | 44 logging::LOCK_LOG_FILE, |
| 45 logging::DELETE_OLD_LOG_FILE, |
| 46 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); |
45 | 47 |
46 if (prefs.GetBool(installer::master_preferences::kVerboseLogging, | 48 if (prefs.GetBool(installer::master_preferences::kVerboseLogging, |
47 &value) && value) { | 49 &value) && value) { |
48 logging::SetMinLogLevel(logging::LOG_VERBOSE); | 50 logging::SetMinLogLevel(logging::LOG_VERBOSE); |
49 } else { | 51 } else { |
50 logging::SetMinLogLevel(logging::LOG_ERROR); | 52 logging::SetMinLogLevel(logging::LOG_ERROR); |
51 } | 53 } |
52 | 54 |
53 // Enable ETW logging. | 55 // Enable ETW logging. |
54 logging::LogEventProvider::Initialize(kSetupTraceProvider); | 56 logging::LogEventProvider::Initialize(kSetupTraceProvider); |
(...skipping 20 matching lines...) Expand all Loading... |
75 FilePath log_path; | 77 FilePath log_path; |
76 if (PathService::Get(base::DIR_TEMP, &log_path)) { | 78 if (PathService::Get(base::DIR_TEMP, &log_path)) { |
77 log_path = log_path.Append(log_filename); | 79 log_path = log_path.Append(log_filename); |
78 return log_path; | 80 return log_path; |
79 } else { | 81 } else { |
80 return FilePath(log_filename); | 82 return FilePath(log_filename); |
81 } | 83 } |
82 } | 84 } |
83 | 85 |
84 } // namespace installer | 86 } // namespace installer |
OLD | NEW |