public CassandraGrainStorage( string name, CassandraStorageOptions cassandraStorageOptions, IOptions <ClusterOptions> clusterOptions, ILogger <CassandraGrainStorage> logger, IGrainFactory grainFactory, ITypeResolver typeResolver, IConcurrentGrainStateTypesProvider concurrentGrainStateTypesProvider, ILoggerProvider loggerProvider) { _name = name; _serviceId = clusterOptions.Value.ServiceId; _cassandraStorageOptions = cassandraStorageOptions; _logger = logger; _grainFactory = grainFactory; _typeResolver = typeResolver; _concurrentStateTypes = new HashSet <Type>(concurrentGrainStateTypesProvider.GetGrainStateTypes()); Diagnostics.CassandraPerformanceCountersEnabled = _cassandraStorageOptions.Diagnostics.PerformanceCountersEnabled; Diagnostics.CassandraStackTraceIncluded = _cassandraStorageOptions.Diagnostics.StackTraceIncluded; if (loggerProvider != null) { Diagnostics.AddLoggerProvider(loggerProvider); } }
public CassandraMembershipTable( IOptions <ClusterOptions> clusterOptions, IOptions <CassandraClusteringOptions> cassandraClusteringOptions, ILogger <CassandraMembershipTable> logger, ILoggerProvider loggerProvider) { _clusterId = clusterOptions.Value.ClusterId; _cassandraClusteringOptions = cassandraClusteringOptions.Value; _logger = logger; Diagnostics.CassandraPerformanceCountersEnabled = _cassandraClusteringOptions.Diagnostics.PerformanceCountersEnabled; Diagnostics.CassandraStackTraceIncluded = _cassandraClusteringOptions.Diagnostics.StackTraceIncluded; if (loggerProvider != null) { Diagnostics.AddLoggerProvider(loggerProvider); } }
public CassandraGatewayListProvider( IOptions <ClusterOptions> clusterOptions, IOptions <GatewayOptions> gatewayOptions, IOptions <CassandraClusteringOptions> cassandraClusteringOptions, ILogger <CassandraGatewayListProvider> logger, ILoggerProvider loggerProvider) { _clusterId = clusterOptions.Value.ClusterId; _cassandraClusteringOptions = cassandraClusteringOptions.Value; _logger = logger; MaxStaleness = gatewayOptions.Value.GatewayListRefreshPeriod; Diagnostics.CassandraPerformanceCountersEnabled = _cassandraClusteringOptions.Diagnostics.PerformanceCountersEnabled; Diagnostics.CassandraStackTraceIncluded = _cassandraClusteringOptions.Diagnostics.StackTraceIncluded; if (loggerProvider != null) { Diagnostics.AddLoggerProvider(loggerProvider); } }
public static void AddLogger(ILoggerProvider logger) { Diagnostics.AddLoggerProvider(logger); }