diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-09-26 22:18:35 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-09-26 22:18:35 +0000 |
commit | 25bd3523fe26b08de0413756673227ccccc332af (patch) | |
tree | a5c0c267bff89f2b849f3f58602d972fb9e39263 /bin/bbackupd/BackupClientDirectoryRecord.h | |
parent | cc17fe1a45f2dd75dea965ec57f1c1c2b1b9223b (diff) |
Add file logging support (LogFile and LogFileLevel config options).
Ensure that backup-finish is always called, and add a new event,
backup-ok, which is called just before backup-finish when the backup
run was successful.
Keep track of the last backup status notification sent (excluding
backup-start and backup-finish) and send a notification whenever it
changes.
Add a new boolean option, NotifyAlways, to override that check and
always send notifications to the NotifyScript after every backup run,
for notify scripts which do their own state tracking or otherwise
require notification on every event.
Diffstat (limited to 'bin/bbackupd/BackupClientDirectoryRecord.h')
-rw-r--r-- | bin/bbackupd/BackupClientDirectoryRecord.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/bin/bbackupd/BackupClientDirectoryRecord.h b/bin/bbackupd/BackupClientDirectoryRecord.h index 9a9cd2cb..05db81a9 100644 --- a/bin/bbackupd/BackupClientDirectoryRecord.h +++ b/bin/bbackupd/BackupClientDirectoryRecord.h @@ -36,7 +36,22 @@ class SysadminNotifier { public: virtual ~SysadminNotifier() { } - virtual void NotifySysadmin(int Event) = 0; + + typedef enum + { + StoreFull = 0, + ReadError, + BackupError, + BackupStart, + BackupFinish, + BackupOK, + MAX + // When adding notifications, remember to add + // strings to NotifySysadmin() + } + EventCode; + + virtual void NotifySysadmin(EventCode Event) = 0; }; // -------------------------------------------------------------------------- @@ -194,7 +209,7 @@ public: bool mHaveLoggedWarningAboutFutureFileTimes; bool StopRun() { return mrRunStatusProvider.StopRun(); } - void NotifySysadmin(int Event) + void NotifySysadmin(SysadminNotifier::EventCode Event) { mrSysadminNotifier.NotifySysadmin(Event); } |