Compartir a través de


DiagnosticMonitor.LocalDataDirectory Property

 

Gets the local directory where state information for the diagnostic monitor is stored.

Namespace:   Microsoft.WindowsAzure.Diagnostics
Assembly:  Microsoft.WindowsAzure.Diagnostics (in Microsoft.WindowsAzure.Diagnostics.dll)

Syntax

public string LocalDataDirectory { get; }
public:
property String^ LocalDataDirectory {
    String^ get();
}
member LocalDataDirectory : string with get
Public ReadOnly Property LocalDataDirectory As String

Property Value

Type: System.String

Type: System.String

A String that indicates the local directory.

Remarks

The LocalDataDirectory property is used to get the local storage path where diagnostics data is stored. DiagnosticMonitor is a singleton, so this property can only be used on a reference to the current instance.

Example

The following example starts the DiagnosticMonitor and writes the LocalDataDirectory path to a log:

// Start the DiagnosticMonitor and create a reference to the instance.
var diagMonitor = DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString");

// Write the directory path to the logs.
Trace.WriteLine("Local Directory: " + diagMonitor.LocalDataDirectory);

Warning

This API is not supported in Azure SDK versions 2.5 and higher. Instead, use the diagnostics.wadcfg XML configuration file. For more information, see Collect Logging Data by Using Azure Diagnostics.

See Also

DiagnosticMonitor Class
Microsoft.WindowsAzure.Diagnostics Namespace

Return to top