summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/sync/tools/sync_listen_notifications.cc8
-rw-r--r--chrome/common/logging_chrome.cc16
-rw-r--r--chrome/installer/util/logging_installer.cc10
-rw-r--r--chrome/tools/crash_service/main.cc8
4 files changed, 32 insertions, 10 deletions
diff --git a/chrome/browser/sync/tools/sync_listen_notifications.cc b/chrome/browser/sync/tools/sync_listen_notifications.cc
index 0f66c27..27e3010 100644
--- a/chrome/browser/sync/tools/sync_listen_notifications.cc
+++ b/chrome/browser/sync/tools/sync_listen_notifications.cc
@@ -222,8 +222,12 @@ class ServerNotifierDelegate
int main(int argc, char* argv[]) {
base::AtExitManager exit_manager;
CommandLine::Init(argc, argv);
- logging::InitLogging(NULL, logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
- logging::LOCK_LOG_FILE, logging::DELETE_OLD_LOG_FILE);
+ logging::InitLogging(
+ NULL,
+ logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
+ logging::LOCK_LOG_FILE,
+ logging::DELETE_OLD_LOG_FILE,
+ logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
logging::SetMinLogLevel(logging::LOG_INFO);
// TODO(akalin): Make sure that all log messages are printed to the
// console, even on Windows (SetMinLogLevel isn't enough).
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index c607f21..9653c40 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -216,12 +216,18 @@ void RedirectChromeLogging(const CommandLine& command_line) {
// Always force a new symlink when redirecting.
FilePath target_path = SetUpSymlinkIfNeeded(log_path, true);
+ logging::DcheckState dcheck_state =
+ command_line.HasSwitch(switches::kEnableDCHECK) ?
+ logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS :
+ logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS;
+
// ChromeOS always logs through the symlink, so it shouldn't be
// deleted if it already exists.
if (!InitLogging(log_path.value().c_str(),
DetermineLogMode(command_line),
logging::LOCK_LOG_FILE,
- logging::APPEND_TO_OLD_LOG_FILE)) {
+ logging::APPEND_TO_OLD_LOG_FILE,
+ dcheck_state)) {
LOG(ERROR) << "Unable to initialize logging to " << log_path.value();
RemoveSymlinkAndLog(log_path, target_path);
} else {
@@ -262,10 +268,16 @@ void InitChromeLogging(const CommandLine& command_line,
delete_old_log_file = logging::APPEND_TO_OLD_LOG_FILE;
#endif
+ logging::DcheckState dcheck_state =
+ command_line.HasSwitch(switches::kEnableDCHECK) ?
+ logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS :
+ logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS;
+
bool success = InitLogging(log_path.value().c_str(),
DetermineLogMode(command_line),
logging::LOCK_LOG_FILE,
- delete_old_log_file);
+ delete_old_log_file,
+ dcheck_state);
#if defined(OS_CHROMEOS)
if (!success) {
diff --git a/chrome/installer/util/logging_installer.cc b/chrome/installer/util/logging_installer.cc
index d91ca70..73e1719 100644
--- a/chrome/installer/util/logging_installer.cc
+++ b/chrome/installer/util/logging_installer.cc
@@ -38,10 +38,12 @@ void InitInstallerLogging(const installer::MasterPreferences& prefs) {
return;
}
- logging::InitLogging(GetLogFilePath(prefs).value().c_str(),
- logging::LOG_ONLY_TO_FILE,
- logging::LOCK_LOG_FILE,
- logging::DELETE_OLD_LOG_FILE);
+ logging::InitLogging(
+ GetLogFilePath(prefs).value().c_str(),
+ logging::LOG_ONLY_TO_FILE,
+ logging::LOCK_LOG_FILE,
+ logging::DELETE_OLD_LOG_FILE,
+ logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
if (prefs.GetBool(installer::master_preferences::kVerboseLogging,
&value) && value) {
diff --git a/chrome/tools/crash_service/main.cc b/chrome/tools/crash_service/main.cc
index 4a8e56a..b9cabec6 100644
--- a/chrome/tools/crash_service/main.cc
+++ b/chrome/tools/crash_service/main.cc
@@ -45,8 +45,12 @@ int __stdcall wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd_line,
FilePath log_file = operating_dir.Append(kStandardLogFile);
// Logging to a file with pid, tid and timestamp.
- logging::InitLogging(log_file.value().c_str(), logging::LOG_ONLY_TO_FILE,
- logging::LOCK_LOG_FILE, logging::APPEND_TO_OLD_LOG_FILE);
+ logging::InitLogging(
+ log_file.value().c_str(),
+ logging::LOG_ONLY_TO_FILE,
+ logging::LOCK_LOG_FILE,
+ logging::APPEND_TO_OLD_LOG_FILE,
+ logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
logging::SetLogItems(true, true, true, false);
VLOG(1) << "session start. cmdline is [" << cmd_line << "]";