TraceContextRecord(String, String, Boolean, Exception) Constructor

Definition

Initializes a new instance of the TraceContextRecord class.

public:
 TraceContextRecord(System::String ^ category, System::String ^ msg, bool isWarning, Exception ^ errorInfo);
public TraceContextRecord (string category, string msg, bool isWarning, Exception errorInfo);
new System.Web.TraceContextRecord : string * string * bool * Exception -> System.Web.TraceContextRecord
Public Sub New (category As String, msg As String, isWarning As Boolean, errorInfo As Exception)

Parameters

category
String

The trace category that receives the message.

msg
String

The trace message.

isWarning
Boolean

true if the method associated with the TraceContextRecord is the Warn method; false if the tracing method is the Write method.

errorInfo
Exception

A Exception object that contains additional error information.

Remarks

Every call to the TraceContext.Write and TraceContext.Warn methods generates a TraceContextRecord object that is added to the TraceContextEventArgs.TraceRecords messages collection. The Warn method call sets the IsWarning property to true, while the Write method calls set it to false.

Applies to

See also