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 GrpcLogger(GrpcPublisher publisher, object componentName) { _publisher = publisher; _component = componentName.ToString(); }