summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorJoe Onorato <joeo@android.com>2009-06-26 17:19:11 -0400
committerJoe Onorato <joeo@android.com>2009-06-26 17:19:11 -0400
commit568bc32344dce841c8f6958f1a65ff839a1b64c0 (patch)
tree6c7f946386e088900b9cda0c66c2e22b1b987dc0 /libs
parent12a4da328a234b171b78cc341544817e9a074057 (diff)
downloadframeworks_base-568bc32344dce841c8f6958f1a65ff839a1b64c0.zip
frameworks_base-568bc32344dce841c8f6958f1a65ff839a1b64c0.tar.gz
frameworks_base-568bc32344dce841c8f6958f1a65ff839a1b64c0.tar.bz2
Better (and less) logging from backup.
Diffstat (limited to 'libs')
-rw-r--r--libs/utils/BackupData.cpp5
-rw-r--r--libs/utils/BackupHelpers.cpp7
2 files changed, 9 insertions, 3 deletions
diff --git a/libs/utils/BackupData.cpp b/libs/utils/BackupData.cpp
index 0868cff..cce754a 100644
--- a/libs/utils/BackupData.cpp
+++ b/libs/utils/BackupData.cpp
@@ -107,7 +107,10 @@ BackupDataWriter::WriteEntityHeader(const String8& key, size_t dataSize)
} else {
k = key;
}
- LOGD("m_keyPrefix=%s key=%s k=%s", m_keyPrefix.string(), key.string(), k.string());
+ if (true) {
+ LOGD("Writing entity: prefix='%s' key='%s' dataSize=%d", m_keyPrefix.string(), key.string(),
+ dataSize);
+ }
entity_header_v1 header;
ssize_t keyLen;
diff --git a/libs/utils/BackupHelpers.cpp b/libs/utils/BackupHelpers.cpp
index 99a4abc..4ad9b51 100644
--- a/libs/utils/BackupHelpers.cpp
+++ b/libs/utils/BackupHelpers.cpp
@@ -68,11 +68,15 @@ struct file_metadata_v1 {
const static int CURRENT_METADATA_VERSION = 1;
-#if 1 // TEST_BACKUP_HELPERS
+#if 1
+#define LOGP(f, x...)
+#else
+#if TEST_BACKUP_HELPERS
#define LOGP(f, x...) printf(f "\n", x)
#else
#define LOGP(x...) LOGD(x)
#endif
+#endif
const static int ROUND_UP[4] = { 0, 3, 2, 1 };
@@ -349,7 +353,6 @@ back_up_files(int oldSnapshotFD, BackupDataWriter* dataStream, int newSnapshotFD
err = stat(file, &st);
if (err != 0) {
- LOGW("Error stating file %s", file);
r.deleted = true;
} else {
r.deleted = false;