diff --git a/sites/all/modules/contrib/notifications/notifications.cron.inc b/sites/all/modules/contrib/notifications/notifications.cron.inc
index fe7c950..fd4298b 100644
--- a/sites/all/modules/contrib/notifications/notifications.cron.inc
+++ b/sites/all/modules/contrib/notifications/notifications.cron.inc
@@ -574,7 +574,12 @@ function notifications_message_part($type, $key, $method, $param = NULL, $module
   }
   else {
     // Failed to get message part, return information about the template not found, will help debugging
-    return "[UNDEFINED module = $module, key = $key, type = $type, method = $method, search = ". implode(',', $search) .']';
+    $message = "[UNDEFINED module = $module, key = $key, type = $type, method = $method, search = ". implode(',', $search) .']';
+    watchdog('notifications', 'Notifications failed to get message part: !message', array('!message' => $message), WATCHDOG_ERROR);
+    if (variable_get('notification_undefined_log_only', FALSE)) {
+      return '';
+    }
+    return $message;
   }
 }
 
