Пример #1
0
 public LoggerReporter(ConnectionManager connectionManager, IConfigAccessor configAccessor,
                       ILoggerFactory loggerFactory)
 {
     _connectionManager = connectionManager;
     _config            = configAccessor.Get <GrpcConfig>();
     _logger            = loggerFactory.CreateLogger(typeof(SegmentReporter));
 }
Пример #2
0
 public static Metadata GetMeta(this GrpcConfig config)
 {
     if (string.IsNullOrEmpty(config.Authentication))
     {
         return(null);
     }
     return(new Metadata {
         new Metadata.Entry("Authentication", config.Authentication)
     });
 }
Пример #3
0
 public static DateTime GetReportTimeout(this GrpcConfig config)
 {
     return(DateTime.UtcNow.AddMilliseconds(config.ReportTimeout));
 }
Пример #4
0
 public ConnectionManager(ILoggerFactory loggerFactory, IConfigAccessor configAccessor)
 {
     _logger = loggerFactory.CreateLogger(typeof(ConnectionManager));
     _config = configAccessor.Get <GrpcConfig>();
 }
Пример #5
0
 public ConnectionManager(ILoggerFactory loggerFactory, IConfigAccessor configAccessor)
 {
     _logger = loggerFactory.CreateLogger(NLog.LogManager.GetCurrentClassLogger());
     _config = configAccessor.Get <GrpcConfig>();
 }