C# Class Microsoft.ApplicationInsights.NLogTarget.ApplicationInsightsTarget

Inheritance: TargetWithLayout
显示文件 Open project: Microsoft/ApplicationInsights-dotnet-logging Class Usage Examples

Private Properties

Property Type Description
BuildPropertyBag void
GetSeverityLevel SeverityLevel?
SendException void
SendTrace void

Public Methods

Method Description
ApplicationInsightsTarget ( ) : System

Initializers a new instance of ApplicationInsightsTarget type.

Protected Methods

Method Description
InitializeTarget ( ) : void

Initializes the Target and perform instrumentationKey validation.

Write ( LogEventInfo logEvent ) : void

Send the log message to Application Insights.

Private Methods

Method Description
BuildPropertyBag ( LogEventInfo logEvent, ITelemetry trace ) : void
GetSeverityLevel ( NLog.LogLevel logEventLevel ) : SeverityLevel?
SendException ( LogEventInfo logEvent ) : void
SendTrace ( LogEventInfo logEvent ) : void

Method Details

ApplicationInsightsTarget() public method

Initializers a new instance of ApplicationInsightsTarget type.
public ApplicationInsightsTarget ( ) : System
return System

InitializeTarget() protected method

Initializes the Target and perform instrumentationKey validation.
Will throw when is not set.
protected InitializeTarget ( ) : void
return void

Write() protected method

Send the log message to Application Insights.
If is null.
protected Write ( LogEventInfo logEvent ) : void
logEvent NLog.LogEventInfo
return void