public void PushLog(PushLogModel pushLogModel) { pushLogModel.RegisteredServiceId = serviceId; pushLogModel.ServiceName = _serviceOptions.CurrentValue.Name; var logTask = _logEventProvider.AddLogEvent(pushLogModel); logTask.Wait(); }
public void PushLog(LogCollectorRequest logCollectorRequest) { logCollectorRequest.ServiceId = serviceId; logCollectorRequest.ServiceName = _selfOptions.ServerName; var logTask = _logEventProvider.AddLogEvent(logCollectorRequest); logTask.Wait(); }
public override async Task <LogCollector.LogCollectorResponse> Push(IAsyncStreamReader <LogCollector.LogCollectorRequest> requestStream, ServerCallContext context) { while (await requestStream.MoveNext().ConfigureAwait(false)) { await _logEventProvider.AddLogEvent(requestStream.Current); } return(new LogCollector.LogCollectorResponse { Succeed = true }); }
public async Task <IActionResult> ConsumeLog([FromBody] PushLogModel pushLogModel) { await _logEventProvider.AddLogEvent(pushLogModel); return(Ok()); }