TraceContextRecord(String, String, Boolean, Exception) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
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
.