Added exception handling to the notification logger.