public void TrackApplicationEvent(Guid correlationId, Enums.ApplicationEvent eventName, Dictionary <string, string> properties)
 {
     try
     {
         if (IsLogTrack)
         {
             if (properties != null)
             {
                 properties.Add("LogFileName", logFileName);
                 properties.Add("PreciseTimeStamp", DateTime.Now.Ticks.ToString());
             }
             TelemetryClient.Context.Operation.Id = correlationId.ToString();
             if (properties != null)
             {
                 TelemetryClient.TrackEvent(eventName.ToString(), properties);
             }
             else
             {
                 TelemetryClient.TrackEvent(eventName.ToString());
             }
             TelemetryClient.Flush();
         }
     }
     catch (LogMangerException)
     {
         throw;
     }
     catch (Exception innerException)
     {
         throw new LogMangerException(nameof(ErrorCodeMessages.LoggerError106) + ": " + ErrorCodeMessages.LoggerError106, innerException);
     }
 }
Esempio n. 2
0
 public void TrackApplicationEvent(Guid correlationId, Enums.ApplicationEvent eventName, Dictionary <string, string> properties)
 {
     try
     {
         if (IsLogTrack)
         {
             LogEntry2("TrackApplicationEvent :" + eventName + ", " + properties.ToDebugString());
         }
     }
     catch (LogMangerException)
     {
         throw;
     }
     catch (Exception innerException)
     {
         throw new LogMangerException(nameof(ErrorCodeMessages.LoggerError106) + ": " + ErrorCodeMessages.LoggerError106, innerException);
     }
 }
Esempio n. 3
0
 public void TrackApplicationEvent(Guid correlationId, Enums.ApplicationEvent eventName, Dictionary <string, string> properties)
 {
     try
     {
         if (IsLogTrack)
         {
             LogEntry2(new CSVFileLogMessage()
             {
                 CorrelationId = this.CorrelationId,
                 EventType     = eventName,
                 LogType       = Enums.LogType.Track,
                 Message       = properties.ToDebugString()
             });
         }
     }
     catch (LogMangerException)
     {
         throw;
     }
     catch (Exception innerException)
     {
         throw new LogMangerException(nameof(ErrorCodeMessages.LoggerError106) + ": " + ErrorCodeMessages.LoggerError106, innerException);
     }
 }