//private static NLog.Logger nLogger; //private static NLog.Logger getLogger() //{ // if (nLogger == null) // { // nLogger = NLog.LogManager.GetLogger("CRUDActions"); // } // return nLogger; //} private static void ProcessNotification(IEntity entity, System.Exception ex, Notification.NoticeType severity) { Notification notification = new Notification() { Severity = severity, Message = ex.Message }; //CRUDActions.getLogger().Info(notification.ToString()); entity.Notifications.Add(notification); }
private static void ProcessNotification <T>(Collection <T> entities, System.Exception ex, Notification.NoticeType severity) where T : IEntity { Notification notification = new Notification() { Severity = severity, Message = ex.Message }; //CRUDActions.getLogger().Info(notification.ToString()); //CRUDActions.getLogger().Info(ex); entities.Notifications.Add(notification); }