diff options
author | Chris Wilson <chris+github@qwirx.com> | 2011-08-27 13:41:36 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2011-08-27 13:41:36 +0000 |
commit | 0f7672aefadda3582b82a5b88adda473fb647b3e (patch) | |
tree | da1f90b71f0f23cef0ba0c968c84205667a00fac /bin/bbackupd/BackupDaemon.h | |
parent | 704fb1fc92cf7fce1304bfc3e3a514caeed73d06 (diff) |
Log the number of files uploaded and directories created, as requested by Achim, closes #61.
Diffstat (limited to 'bin/bbackupd/BackupDaemon.h')
-rw-r--r-- | bin/bbackupd/BackupDaemon.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/bin/bbackupd/BackupDaemon.h b/bin/bbackupd/BackupDaemon.h index ecd2370b..23172f00 100644 --- a/bin/bbackupd/BackupDaemon.h +++ b/bin/bbackupd/BackupDaemon.h @@ -235,6 +235,7 @@ private: TLSContext mTlsContext; bool mDeleteStoreObjectInfoFile; bool mDoSyncForcedByPreviousSyncError; + int64_t mNumFilesUploaded, mNumDirsCreated; public: bool StopRun() { return this->Daemon::StopRun(); } @@ -477,7 +478,8 @@ public: BOX_NOTICE("Uploaded file: " << rLocalPath << ", " "total size = " << FileSize << ", " "uploaded size = " << UploadedSize); - } + } + mNumFilesUploaded++; } virtual void NotifyFileSynchronised( const BackupClientDirectoryRecord* pDirRecord, @@ -489,6 +491,19 @@ public: BOX_INFO("Synchronised file: " << rLocalPath); } } + virtual void NotifyDirectoryCreated( + int64_t ObjectID, + const std::string& rLocalPath, + const std::string& rRemotePath) + { + if (mLogAllFileAccess) + { + BOX_NOTICE("Created directory: " << rRemotePath << + " (ID " << BOX_FORMAT_OBJECTID(ObjectID) << + ")"); + } + mNumDirsCreated++; + } virtual void NotifyDirectoryDeleted( int64_t ObjectID, const std::string& rRemotePath) |