public static void Exception(ExceptionLog exceptionLog, Exception ex) { StringBuilder sbMsg = new StringBuilder(); sbMsg.AppendFormat("ControllerName={0},ActionName={1},Msg={2}", exceptionLog?.ControllerName, exceptionLog?.ActionName, ex?.Message); Log4NetHelper.Error(sbMsg.ToString(), ex); Log4DbHelper.Exception(exceptionLog); }
public static void Exception(string controllername, string actionname, Exception ex) { StringBuilder sbMsg = new StringBuilder(); sbMsg.AppendFormat("ControllerName={0},ActionName={1},Msg={2}", controllername, actionname, ex.Message); Log4NetHelper.Error(sbMsg.ToString(), ex); Log4DbHelper.Exception(controllername, actionname, ex); }