コード例 #1
0
 public LogEventProcessorFactory(
     ILogService logService,
     LogEventIndexerService indexerService)
 {
     _logService     = logService;
     _indexerService = indexerService;
 }
コード例 #2
0
        private void StartLogEventHubProcessor()
        {
            _logService.Info("Starting log event hub processor");

            var configuration = _configurationService.Get <Configuration.AzureEventHubLogIndexerConfiguration>();

            _eventProcessorHost = new EventProcessorHost(
                Environment.MachineName,
                configuration.EventHubPath,
                configuration.ConsumerGroupName,
                configuration.EventHubConnectionString,
                configuration.StorageConnectionString);

            var indexerService        = new LogEventIndexerService(_configurationService);
            var eventProcessorFactory = new LogEventProcessorFactory(_logService, indexerService);

            _eventProcessorHost.RegisterEventProcessorFactoryAsync(eventProcessorFactory);

            _logService.Info("Started log event hub processor");
        }