Class Diagnostics
Provides a set of methods and properties related to logging in the driver.
Inheritance
Inherited Members
Namespace: Dse
Assembly: Dse.dll
Syntax
public static class Diagnostics
Fields
CassandraTraceSwitch
Specifies what messages should be passed to the output log when using the System.Diagnostics.Trace API.
Declaration
public static readonly TraceSwitch CassandraTraceSwitch
Field Value
Type | Description |
---|---|
System.Diagnostics.TraceSwitch |
Remarks
Consider using Microsoft.Extensions.Logging
API instead by adding a Microsoft.Extensions.Logging.ILoggerProvider
using the AddLoggerProvider(ILoggerProvider) method.
See Also
Properties
CassandraPerformanceCountersEnabled
Defines if performance counters should be enabled.
Default value is
Declaration
public static bool CassandraPerformanceCountersEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
CassandraStackTraceIncluded
Defines if exception StackTrace information should be printed by trace logger.
Default value is
Declaration
public static bool CassandraStackTraceIncluded { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
AddLoggerProvider(ILoggerProvider)
Adds a Microsoft.Extensions.Logging.ILoggerProvider to the logger factory used by the driver.
Be sure to call this method before initializing the ICluster to ensure that Microsoft.Extensions.Logging.ILoggerFactory API is used as driver logging mechanism instead of System.Diagnostics.Trace.
Declaration
public static void AddLoggerProvider(ILoggerProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Logging.ILoggerProvider | provider | The logger provider to add to the logger factory |