public static void Setup(string serverUrl)
        {
            if (_factory != null)
            {
                return;
            }

            var client = !string.IsNullOrEmpty(serverUrl)
                ? GrpcChannel
                         .ForAddress(serverUrl)
                         .CreateGrpcService <ISystemLogService>()
                : null;

            var publisher = new GrpcPublisher(client);

            _factory = new GrpcLoggerFactory(publisher);
        }
 public GrpcLoggerProvider(IGrpcLoggerFactory factory)
 {
     _factory = factory;
 }
Beispiel #3
0
 public ClientTestController(IGrpcLoggerFactory loggerFactory, ILogger <ClientTestController> logger)
 {
     _logger = logger;
     _log    = loggerFactory.GetLogger(this);
 }