Provides a set of methods and properties that help Ultimate Components and you trace the execution of code.

Syntax

public class XTrace

Examples

Add log capability to your application.

// Set the log level.
ComponentPro.Diagnostics.XTrace.Default.Level = ComponentPro.Diagnostics.TraceEventType.Verbose;
// By default the AutoFlush property is true.  
// If you wish to turn it off, just set it to false as follows: 
// ComponentPro.Diagnostics.XTrace.AutoFlush = false; 
 
// Add the UltimateTextWriterTraceListener listener to write to a file.
ComponentPro.Diagnostics.XTrace.Default.Listeners.Add(
    new ComponentPro.Diagnostics.UltimateTextWriterTraceListener("c:\\temp\\log.log"));

// You can also write log to a Console window with the following code:
ComponentPro.Diagnostics.XTrace.Default.Listeners.Add(new ComponentPro.Diagnostics.UltimateConsoleTraceListener());

// Or write log to the Output window and .NET trace listeners:
ComponentPro.Diagnostics.XTrace.Default.Listeners.Add(new ComponentPro.Diagnostics.UltimateOutputTraceListener());

Inheritance Hierarchy

   ComponentPro.Diagnostics.ComponentPro.Diagnostics.XTrace

Framework

.NET Compact Framework.NET Compact Framework

Supported version: 2.0, 3.5, and 3.9
Assembly: ComponentPro.Common.CF (in ComponentPro.Common.CF.dll)

.NET Framework.NET Framework

Supported version: 2.0, 3.0, 3.5, 4.0, 4.5.x, 4.6.x and later
Assembly: ComponentPro.Common (in ComponentPro.Common.dll)

Xamarin AndroidXamarin Android

Supported version: 2.3 and later
Assembly: ComponentPro.Common.Android (in ComponentPro.Common.Android.dll)

Xamarin MacXamarin Mac

Supported version: 2.0.x and later
Assembly: ComponentPro.Common.Mac (in ComponentPro.Common.Mac.dll)

Xamarin iOSXamarin iOS

Supported version: 5.1.x and later
Assembly: ComponentPro.Common.iOS (in ComponentPro.Common.iOS.dll)

See Also