Better (and less) logging from backup.

This commit is contained in:
Joe Onorato 2009-06-26 17:19:11 -04:00 committed by Alex Ray
parent 8b72a9bb4e
commit ff57433745
2 changed files with 9 additions and 3 deletions

View file

@ -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;

View file

@ -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;