public void UpdateInterfaceRealtimeInfoWithExceptionService(string interfaceName, string applicationName, string server, int stateCode, string exceptionInfo) { try { Log4netInit(); GetDataBaseConfig(); InterfaceRealtimeBizProcess.UpdateInterfaceRealtimeInfoWithException(interfaceName, applicationName, server, stateCode, exceptionInfo); log.Info(string.Format("UpdateInterfaceRealtimeInfoWithExceptionService({0},{1},{2},{3},{4})调用成功!", interfaceName, applicationName, server, stateCode, exceptionInfo)); } catch (Exception ex) { log.Error(string.Format("UpdateInterfaceRealtimeInfoWithExceptionService({0},{1},{2},{3},{4})调用异常,异常信息如下:{5}", interfaceName, applicationName, server, stateCode, exceptionInfo, ex)); } }
private void button16_Click(object sender, EventArgs e) { InterfaceRealtimeBizProcess.UpdateInterfaceRealtimeInfo("InterfaceMonitor.Frameworks.Dal.InterfaceConfigInfoDal", "测试接口2", "192.168.1.80", 100); InterfaceRealtimeBizProcess.UpdateInterfaceRealtimeInfoWithException("InterfaceMonitor.Frameworks.Dal.InterfaceConfigInfoDal", "测试接口2", "192.168.1.80", 80, "InterfaceMonitor.Frameworks.Dal.InterfaceConfigInfoDal尝试连接失败,请重试!"); }