Esempio n. 1
0
 private async Task ElasticsearchSendMessages(ElasticBulkMessage message)
 {
     try
     {
         await ESCallerService.BulkAsync(message);
     }
     catch (Exception ex)
     {
         Debug.LogException(ex);
         Debug.LogError($"Exception while emitting periodic batch from {this}: {ex}");
     }
 }
Esempio n. 2
0
        public LogDelivery(ElasticConfig elasticConfig)
        {
            _elasticConfig = elasticConfig;

            if (_elasticConfig.transformer == null)
            {
                _elasticConfig.transformer = DefaultTransformer;
            }

            cancellationTokenSource = new CancellationTokenSource();

            ESCallerService.Setup(_elasticConfig);

#if DEBUG
            includeLogs = true;
#endif

            Task.Run(CheckLogs, cancellationTokenSource.Token);
        }
 public static void Setup(ElasticConfig config)
 {
     instance        = new ESCallerService();
     instance.caller = new UnityCaller();
     instance.caller.Setup(new Uri(config.address), new BasicAuthentication(config.user, config.password));
 }