[Box Backup-commit] COMMIT r2396 - box/trunk/bin/bbackupd
boxbackup-dev at boxbackup.org
boxbackup-dev at boxbackup.org
Mon Dec 1 22:17:54 GMT 2008
Author: chris
Date: 2008-12-01 22:17:52 +0000 (Mon, 01 Dec 2008)
New Revision: 2396
Modified:
box/trunk/bin/bbackupd/BackupDaemon.cpp
Log:
Reduce severity of some log messages about notifying system
administrator. It's not an error to have no NotifyScript.
Modified: box/trunk/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/trunk/bin/bbackupd/BackupDaemon.cpp 2008-12-01 01:31:51 UTC (rev 2395)
+++ box/trunk/bin/bbackupd/BackupDaemon.cpp 2008-12-01 22:17:52 UTC (rev 2396)
@@ -2158,10 +2158,21 @@
!GetConfiguration().GetKeyValueBool("NotifyAlways"))
{
// Don't send lots of repeated messages
+ // Note: backup-start and backup-finish will always be
+ // logged, because mLastNotifiedEvent is never set to
+ // these values and therefore they are never "duplicates".
if(mLastNotifiedEvent == Event)
{
- BOX_WARNING("Suppressing duplicate notification about " <<
- sEventNames[Event]);
+ if(Event == SysadminNotifier::BackupOK)
+ {
+ BOX_INFO("Suppressing duplicate notification "
+ "about " << sEventNames[Event]);
+ }
+ else
+ {
+ BOX_WARNING("Suppressing duplicate notification "
+ "about " << sEventNames[Event]);
+ }
return;
}
}
@@ -2174,7 +2185,7 @@
if(Event != SysadminNotifier::BackupStart &&
Event != SysadminNotifier::BackupFinish)
{
- BOX_ERROR("Not notifying administrator about event "
+ BOX_INFO("Not notifying administrator about event "
<< sEventNames[Event] << " -- set NotifyScript "
"to do this in future");
}
@@ -2186,7 +2197,7 @@
sEventNames[Event]);
// Log what we're about to do
- BOX_NOTICE("About to notify administrator about event "
+ BOX_INFO("About to notify administrator about event "
<< sEventNames[Event] << ", running script '"
<< script << "'");
@@ -2194,7 +2205,7 @@
int returnCode = ::system(script.c_str());
if(returnCode != 0)
{
- BOX_ERROR("Notify script returned error code: " <<
+ BOX_WARNING("Notify script returned error code: " <<
returnCode << " ('" << script << "')");
}
else if(Event != SysadminNotifier::BackupStart &&
More information about the Boxbackup-commit
mailing list