OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 } | 87 } |
88 | 88 |
89 FilePath log_file_path(GetLogFilePath(prefs)); | 89 FilePath log_file_path(GetLogFilePath(prefs)); |
90 TruncateLogFileIfNeeded(log_file_path); | 90 TruncateLogFileIfNeeded(log_file_path); |
91 | 91 |
92 logging::InitLogging( | 92 logging::InitLogging( |
93 log_file_path.value().c_str(), | 93 log_file_path.value().c_str(), |
94 logging::LOG_ONLY_TO_FILE, | 94 logging::LOG_ONLY_TO_FILE, |
95 logging::LOCK_LOG_FILE, | 95 logging::LOCK_LOG_FILE, |
96 logging::APPEND_TO_OLD_LOG_FILE, | 96 logging::APPEND_TO_OLD_LOG_FILE, |
97 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); | 97 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS, |
| 98 logging::DISABLE_DLOG_FOR_NON_OFFICIAL_RELEASE_BUILDS); |
98 | 99 |
99 if (prefs.GetBool(installer::master_preferences::kVerboseLogging, | 100 if (prefs.GetBool(installer::master_preferences::kVerboseLogging, |
100 &value) && value) { | 101 &value) && value) { |
101 logging::SetMinLogLevel(logging::LOG_VERBOSE); | 102 logging::SetMinLogLevel(logging::LOG_VERBOSE); |
102 } else { | 103 } else { |
103 logging::SetMinLogLevel(logging::LOG_ERROR); | 104 logging::SetMinLogLevel(logging::LOG_ERROR); |
104 } | 105 } |
105 | 106 |
106 // Enable ETW logging. | 107 // Enable ETW logging. |
107 logging::LogEventProvider::Initialize(kSetupTraceProvider); | 108 logging::LogEventProvider::Initialize(kSetupTraceProvider); |
(...skipping 18 matching lines...) Expand all Loading... |
126 FilePath log_path; | 127 FilePath log_path; |
127 if (PathService::Get(base::DIR_TEMP, &log_path)) { | 128 if (PathService::Get(base::DIR_TEMP, &log_path)) { |
128 log_path = log_path.Append(log_filename); | 129 log_path = log_path.Append(log_filename); |
129 return log_path; | 130 return log_path; |
130 } else { | 131 } else { |
131 return FilePath(log_filename); | 132 return FilePath(log_filename); |
132 } | 133 } |
133 } | 134 } |
134 | 135 |
135 } // namespace installer | 136 } // namespace installer |
OLD | NEW |