Class Diagnostics
Provides a set of methods and properties related to logging in the driver.
Inherited Members
Namespace: Cassandra
Assembly: Cassandra.dll
Syntax
public static class Diagnostics
Fields
CassandraTraceSwitch
Specifies what messages should be passed to the output log when using the Trace API.
Declaration
public static readonly TraceSwitch CassandraTraceSwitch
Field Value
Type | Description |
---|---|
TraceSwitch |
Remarks
Consider using Microsoft.Extensions.Logging
API instead by adding a 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 |
---|---|
bool |
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 |
---|---|
bool |
Methods
AddLoggerProvider(ILoggerProvider)
Adds a ILoggerProvider to the logger factory used by the driver.
Be sure to call this method before initializing the ICluster to ensure that ILoggerFactory API is used as driver logging mechanism instead of Trace.
Declaration
public static void AddLoggerProvider(ILoggerProvider provider)
Parameters
Type | Name | Description |
---|---|---|
ILoggerProvider | provider | The logger provider to add to the logger factory |