示例#1
0
        /// <inheritdoc />
        public void Log(LogLevel level, string message)
        {
            if (this.telemetryDisabled)
            {
                return;
            }
            try
            {
                var telemetry = new TraceTelemetry(message, LogSeverityMapper.Map(level));

                if (!isSettingsInitialized)
                {
                    this.telemetryToSendLater.Enqueue(telemetry);
                }
                else
                {
                    this.TelemetryClient.TrackTrace(telemetry);
                }
            }
            catch
            {
                if (!this.telimenaProperties.SuppressAllErrors)
                {
                    throw;
                }
            }
        }
 /// <inheritdoc />
 public void Log(LogLevel level, string message)
 {
     try
     {
         this.TelemetryClient.TrackTrace(message, LogSeverityMapper.Map(level));
     }
     catch
     {
         if (!this.telimenaProperties.SuppressAllErrors)
         {
             throw;
         }
     }
 }