C# 클래스 Microsoft.ApplicationInsights.TraceListener.ApplicationInsightsTraceListener

Listener that routes all tracing and debugging output to ApplicationInsights logging framework. The messages will be uploaded to the Application Insights cloud service.
상속: System.Diagnostics.TraceListener
파일 보기 프로젝트 열기: Microsoft/ApplicationInsights-dotnet-logging

Private Properties

프로퍼티 타입 설명
CreateTraceData void
GetSeverityLevel SeverityLevel

공개 메소드들

메소드 설명
ApplicationInsightsTraceListener ( ) : System

Initializes a new instance of the ApplicationInsightsTraceListener class, without specifying a component ID.

ApplicationInsightsTraceListener ( string instrumentationKey ) : System

Initializes a new instance of the ApplicationInsightsTraceListener class, and validates the component id passed as the initialize-data. An empty or null Component ID is acceptable because the event source will fall back to the one set in ApplicationInsights.config, however an invalid Component ID will throw an exception.

TraceData ( TraceEventCache eventCache, string source, TraceEventType eventType, int id ) : void

Writes trace data to the listener specific output.

TraceData ( TraceEventCache eventCache, string source, TraceEventType eventType, int id, object data ) : void

Writes trace data to the listener specific output.

TraceEvent ( TraceEventCache eventCache, string source, TraceEventType eventType, int id ) : void

Writes trace information, a message, and event information to the listener specific output.

TraceEvent ( TraceEventCache eventCache, string source, TraceEventType eventType, int id, string format ) : void

Writes trace information, a message, and event information to the listener specific output.

Write ( string message ) : void

Writes the specified message to the listener.

WriteLine ( string message ) : void

Writes the specified message to the listener followed by a line terminator.

비공개 메소드들

메소드 설명
CreateTraceData ( TraceEventCache eventCache, TraceEventType eventType, int id, Microsoft.ApplicationInsights.DataContracts.TraceTelemetry trace ) : void
GetSeverityLevel ( TraceEventType eventType ) : SeverityLevel

메소드 상세

ApplicationInsightsTraceListener() 공개 메소드

Initializes a new instance of the ApplicationInsightsTraceListener class, without specifying a component ID.
public ApplicationInsightsTraceListener ( ) : System
리턴 System

ApplicationInsightsTraceListener() 공개 메소드

Initializes a new instance of the ApplicationInsightsTraceListener class, and validates the component id passed as the initialize-data. An empty or null Component ID is acceptable because the event source will fall back to the one set in ApplicationInsights.config, however an invalid Component ID will throw an exception.
public ApplicationInsightsTraceListener ( string instrumentationKey ) : System
instrumentationKey string Instrumentation Key of your application.
리턴 System

TraceData() 공개 메소드

Writes trace data to the listener specific output.
public TraceData ( TraceEventCache eventCache, string source, TraceEventType eventType, int id ) : void
eventCache System.Diagnostics.TraceEventCache A TraceEventCache object that contains the current process ID, thread ID, and stack trace information.
source string A name used to identify the output, typically the name of the application that generated the trace event.
eventType TraceEventType One of the TraceEventType values specifying the type of event that has caused the trace.
id int A numeric identifier for the event.
리턴 void

TraceData() 공개 메소드

Writes trace data to the listener specific output.
public TraceData ( TraceEventCache eventCache, string source, TraceEventType eventType, int id, object data ) : void
eventCache System.Diagnostics.TraceEventCache A TraceEventCache object that contains the current process ID, thread ID, and stack trace information.
source string A name used to identify the output, typically the name of the application that generated the trace event.
eventType TraceEventType One of the TraceEventType values specifying the type of event that has caused the trace.
id int A numeric identifier for the event.
data object The trace data to emit.
리턴 void

TraceEvent() 공개 메소드

Writes trace information, a message, and event information to the listener specific output.
public TraceEvent ( TraceEventCache eventCache, string source, TraceEventType eventType, int id ) : void
eventCache System.Diagnostics.TraceEventCache A TraceEventCache object that contains the current process ID, thread ID, and stack trace information.
source string A name used to identify the output, typically the name of the application that generated the trace event.
eventType TraceEventType One of the TraceEventType values specifying the type of event that has caused the trace.
id int A numeric identifier for the event.
리턴 void

TraceEvent() 공개 메소드

Writes trace information, a message, and event information to the listener specific output.
public TraceEvent ( TraceEventCache eventCache, string source, TraceEventType eventType, int id, string format ) : void
eventCache System.Diagnostics.TraceEventCache A TraceEventCache object that contains the current process ID, thread ID, and stack trace information.
source string A name used to identify the output, typically the name of the application that generated the trace event.
eventType TraceEventType One of the TraceEventType values specifying the type of event that has caused the trace.
id int A numeric identifier for the event.
format string A format string that contains zero or more format items, which correspond to objects in the args array.
리턴 void

Write() 공개 메소드

Writes the specified message to the listener.
public Write ( string message ) : void
message string A message to write.
리턴 void

WriteLine() 공개 메소드

Writes the specified message to the listener followed by a line terminator.
public WriteLine ( string message ) : void
message string A message to write.
리턴 void