public static void WriteLogEntry(TraceMessage m) { //Get the operating enterprise terminal try { _Client = new TLViewerServiceClient(); _Client.WriteLogEntry(m); _Client.Close(); } catch (FaultException fe) { throw new ApplicationException("WriteLogEntry() service error.", fe); } catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("WriteLogEntry() timeout error.", te); } catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("WriteLogEntry() communication error.", ce); } }
public void WriteLogEntry(TraceMessage m) { //Write an entry into the Argix log LTLServiceClient client = new LTLServiceClient(); try { client.WriteLogEntry(m); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <ConfigurationFault> cfe) { client.Abort(); throw new ApplicationException(cfe.Detail.Message); } catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); } }
public static void WriteLogEntry(TraceMessage m) { //Get the operating enterprise terminal LTLService2Client client = null; try { client = new LTLService2Client(); client.WriteLogEntry(m); client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message, te); } catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message, fe); } catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message, ce); } }
public static void WriteLogEntry(TraceMessage m) { //Get the operating enterprise terminal TsortServiceClient client = new TsortServiceClient(); try { client.WriteLogEntry(int.Parse(Program.TerminalCode), m); client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <ConfigurationFault> efe) { client.Abort(); throw new ApplicationException(efe.Detail.Message); } catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); } }
public void WriteLogEntry(LogLevel level, string username, Exception ex) { //Write an entry into the Argix log LTLService2Client client = new LTLService2Client(); try { TraceMessage tm = new TraceMessage(); tm.Name = LOG_NAME; tm.LogLevel = level; tm.Date = DateTime.Now; tm.Source = LOG_SOURCE; tm.Category = tm.Event = ""; tm.User = username; tm.Computer = ""; tm.Keyword1 = tm.Keyword2 = tm.Keyword3 = ""; tm.Message = ex.ToString(); client.WriteLogEntry(tm); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <ConfigurationFault> cfe) { client.Abort(); throw new ApplicationException(cfe.Detail.Message); } catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); } }
public void WriteLogEntry(TraceMessage m) { //Write o to database log if event level is severe enough new Argix.AppService(EnterpriseGateway.SQL_CONNID).WriteLogEntry(m); }