Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6943)

Unified Diff: chrome/common/logging_chrome.cc

Issue 8467028: Enable DVLOG on non official release build based on the parameter passed for InitLogging. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/tools/sync_listen_notifications.cc ('k') | chrome/installer/util/logging_installer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/logging_chrome.cc
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index 958d46427b81b23a7ac6ead7393a930bb4050b11..c18344437f44236ceec19db8dd85afc8f46c6e2f 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -245,13 +245,19 @@ void RedirectChromeLogging(const CommandLine& command_line) {
logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS :
logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS;
+ logging::DlogState dlog_state =
+ command_line.HasSwitch(switches::kEnableDLOG) ?
+ logging::ENABLE_DLOG_FOR_NON_OFFICIAL_RELEASE_BUILDS:
+ logging::DISABLE_DLOG_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,
- dcheck_state)) {
+ dcheck_state,
+ dlog_state)) {
DLOG(ERROR) << "Unable to initialize logging to " << log_path.value();
RemoveSymlinkAndLog(log_path, target_path);
} else {
@@ -306,11 +312,18 @@ void InitChromeLogging(const CommandLine& command_line,
logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS :
logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS;
+ logging::DlogState dlog_state =
+ command_line.HasSwitch(switches::kEnableDLOG) ?
+ logging::ENABLE_DLOG_FOR_NON_OFFICIAL_RELEASE_BUILDS:
+ logging::DISABLE_DLOG_FOR_NON_OFFICIAL_RELEASE_BUILDS;
+
+
bool success = InitLogging(log_path.value().c_str(),
logging_dest,
logging::LOCK_LOG_FILE,
delete_old_log_file,
- dcheck_state);
+ dcheck_state,
+ dlog_state);
#if defined(OS_CHROMEOS)
if (!success) {
« no previous file with comments | « chrome/browser/sync/tools/sync_listen_notifications.cc ('k') | chrome/installer/util/logging_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698