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

Unified Diff: chrome/browser/sync_file_system/drive_file_sync_service.cc

Issue 15657002: Mirror syncfs log to console and WebUI, with LogSeverity support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simplified macro Created 7 years, 7 months 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
Index: chrome/browser/sync_file_system/drive_file_sync_service.cc
diff --git a/chrome/browser/sync_file_system/drive_file_sync_service.cc b/chrome/browser/sync_file_system/drive_file_sync_service.cc
index 17c43aa59c4e552b85dc15936e108f9218c0b4e0..e8ac45a0ca9911c147b3738c47f4c191d0468412 100644
--- a/chrome/browser/sync_file_system/drive_file_sync_service.cc
+++ b/chrome/browser/sync_file_system/drive_file_sync_service.cc
@@ -1453,7 +1453,7 @@ void DriveFileSyncService::MaybeStartFetchChanges() {
}
void DriveFileSyncService::OnNotificationReceived() {
- util::Log("Notification received to check for Google Drive updates");
+ SYNCFS_LOG(INFO, "Notification received to check for Google Drive updates");
// TODO(calvinlo): Try to eliminate may_have_unfetched_changes_ variable.
may_have_unfetched_changes_ = true;
MaybeStartFetchChanges();
@@ -1461,7 +1461,7 @@ void DriveFileSyncService::OnNotificationReceived() {
void DriveFileSyncService::OnPushNotificationEnabled(bool enabled) {
const char* status = (enabled ? "enabled" : "disabled");
- util::Log("XMPP Push notification is %s", status);
+ SYNCFS_LOG(INFO, "XMPP Push notification is %s", status);
}
void DriveFileSyncService::MaybeScheduleNextTask() {
@@ -1583,12 +1583,14 @@ void DriveFileSyncService::DidFetchChangesForIncrementalSync(
}
if (reset_sync_root) {
- LOG(WARNING) << "Detected unexpected SyncRoot deletion.";
+ SYNCFS_LOG(WARNING, "Detected unexpected SyncRoot deletion.");
metadata_store_->SetSyncRootDirectory(std::string());
}
for (std::set<GURL>::iterator itr = reset_origins.begin();
itr != reset_origins.end(); ++itr) {
- LOG(WARNING) << "Detected unexpected OriginRoot deletion:" << itr->spec();
+ SYNCFS_LOG(WARNING,
+ "Detected unexpected OriginRoot deletion: %s",
+ itr->spec().c_str());
pending_batch_sync_origins_.erase(*itr);
metadata_store_->SetOriginRootDirectory(*itr, std::string());
}

Powered by Google App Engine
This is Rietveld 408576698