Here are the examples of the csharp api class Microsoft.ApplicationInsights.Log4NetAppender.ApplicationInsightsAppender.GetSeverityLevel(log4net.Core.Level) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
0
1. Example
Project: ApplicationInsights-dotnet-logging
Source File: ApplicationInsightsAppender.cs
Source File: ApplicationInsightsAppender.cs
private void SendException(LoggingEvent loggingEvent) { try { var exceptionTelemetry = new ExceptionTelemetry(loggingEvent.ExceptionObject) { SeverityLevel = this.GetSeverityLevel(loggingEvent.Level) }; string message = null; if (loggingEvent.RenderedMessage != null) { message = this.RenderLoggingEvent(loggingEvent); } if (!string.IsNullOrEmpty(message)) { exceptionTelemetry.Properties.Add("Message", message); } this.BuildCustomProperties(loggingEvent, exceptionTelemetry); this.telemetryClient.Track(exceptionTelemetry); } catch (ArgumentNullException exception) { throw new LogException(exception.Message, exception); } }
0
2. Example
Project: ApplicationInsights-dotnet-logging
Source File: ApplicationInsightsAppender.cs
Source File: ApplicationInsightsAppender.cs
private void SendTrace(LoggingEvent loggingEvent) { try { loggingEvent.GetProperties(); string message = loggingEvent.RenderedMessage != null ? this.RenderLoggingEvent(loggingEvent) : "Log4Net Trace"; var trace = new TraceTelemetry(message) { SeverityLevel = this.GetSeverityLevel(loggingEvent.Level) }; this.BuildCustomProperties(loggingEvent, trace); this.telemetryClient.Track(trace); } catch (ArgumentNullException exception) { throw new LogException(exception.Message, exception); } }