adding quick logs

This commit is contained in:
defnotken
2025-09-04 18:00:43 -05:00
parent b782b0694f
commit 3b6268e82f

View File

@@ -109,9 +109,11 @@ public class LightlessConfigurationServiceClient<T> : IHostedService, IConfigura
{ {
try try
{ {
_logger.LogInformation("Getting {key} from Http", key); _logger.LogInformation("Getting {key} from Http with {} ", key, GetRoute(key, Convert.ToString(defaultValue, CultureInfo.InvariantCulture)));
using HttpRequestMessage msg = new(HttpMethod.Get, GetRoute(key, Convert.ToString(defaultValue, CultureInfo.InvariantCulture))); using HttpRequestMessage msg = new(HttpMethod.Get, GetRoute(key, Convert.ToString(defaultValue, CultureInfo.InvariantCulture)));
msg.Headers.Authorization = new AuthenticationHeaderValue("Bearer", _serverTokenGenerator.Token); msg.Headers.Authorization = new AuthenticationHeaderValue("Bearer", _serverTokenGenerator.Token);
_logger.LogInformation("Using Token {token}", _serverTokenGenerator.Token);
using var response = await _httpClient.SendAsync(msg).ConfigureAwait(false); using var response = await _httpClient.SendAsync(msg).ConfigureAwait(false);
response.EnsureSuccessStatusCode(); response.EnsureSuccessStatusCode();
var content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); var content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);