Esempio n. 1
0
 public ESLogger(ESClientProvider esClient, IHttpContextAccessor httpContextAccessor, string categoryName, LogLevel logLevel)
 {
     _esClient            = esClient;
     _httpContextAccessor = httpContextAccessor;
     _categoryName        = categoryName;
     _logLevel            = logLevel;
 }
        public ESLoggerProvider(IServiceProvider serviceProvider, string indexName = null, FilterLoggerSettings filter = null)
        {
            _httpContextAccessor = serviceProvider.GetService <IHttpContextAccessor>();
            _indexName           = indexName;

            _esClient = serviceProvider.GetService <ESClientProvider>();
            _esClient.EnsureIndexWithMapping <LogEntry>(indexName);

            _filter = filter ?? new FilterLoggerSettings
            {
                { "*", LogLevel.Trace }
            };
        }
Esempio n. 3
0
 public CarController(ICarService carService, ESClientProvider esClientProvider)
 {
     _carService       = carService;
     _esClientProvider = esClientProvider;
 }
 public PublishToElasticSearchService(ESClientProvider esClientProvider)
 {
     _esClientProvider = esClientProvider;
 }
 public ProductController(ESClientProvider esClientProvider)
 {
     _esClientProvider = esClientProvider;
 }