From f41d266df2595fe6b8c6e7cd1a4ef8f2f0f37caa Mon Sep 17 00:00:00 2001 From: liguoyang Date: Fri, 28 Jun 2024 14:56:46 +0800 Subject: [PATCH] log . --- Src/Dlhis.Middle/Controllers/GainfosController.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Src/Dlhis.Middle/Controllers/GainfosController.cs b/Src/Dlhis.Middle/Controllers/GainfosController.cs index dc60ef38..5be9a57a 100644 --- a/Src/Dlhis.Middle/Controllers/GainfosController.cs +++ b/Src/Dlhis.Middle/Controllers/GainfosController.cs @@ -13,11 +13,13 @@ public class GainfosController : ControllerBase { private readonly IHttpClientFactory _httpClientFactory; private readonly IConfiguration _configuration; + private readonly ILogger _logger; - public GainfosController(IHttpClientFactory httpClientFactory, IConfiguration configuration) + public GainfosController(IHttpClientFactory httpClientFactory, IConfiguration configuration, ILogger logger) { _httpClientFactory = httpClientFactory; _configuration = configuration; + _logger = logger; } /// @@ -33,6 +35,8 @@ public class GainfosController : ControllerBase var hostName = _configuration.GetSection("HostName").Value; var httpClient = _httpClientFactory.CreateClient(); + _logger.LogInformation("token:{token}", token); + try { var faceBytes = await httpClient.GetByteArrayAsync($"https://{hostName}/api/basic/gainfos/face?token={token}");