From e8b10a69edaf7323ee162ce1a2a6f7dd2001a685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rich=C3=A1rd=20Kunkli?= Date: Sun, 1 Nov 2020 12:28:33 +0100 Subject: [PATCH] Fixed formatting --- Birdmap.API/Controllers/ServiceController.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Birdmap.API/Controllers/ServiceController.cs b/Birdmap.API/Controllers/ServiceController.cs index b68f955..d720af3 100644 --- a/Birdmap.API/Controllers/ServiceController.cs +++ b/Birdmap.API/Controllers/ServiceController.cs @@ -5,13 +5,11 @@ using Birdmap.DAL.Entities; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; -using System.Runtime.InteropServices.ComTypes; using System.Threading.Tasks; namespace Birdmap.API.Controllers @@ -45,14 +43,14 @@ namespace Birdmap.API.Controllers { try { - _logger.LogInformation($"Sending a request to service '{si.Service.Name}' with url '{si.Service.Uri}'..."); + _logger.LogInformation($"Sending a request to service [{si.Service.Name}] with url [{si.Service.Uri}]..."); var response = await client.GetAsync(si.Service.Uri); si.StatusCode = response.StatusCode; si.Response = await response.Content.ReadAsStringAsync(); } catch (Exception ex) { - _logger.LogWarning($"Requesting service '{si.Service.Name}' faulted."); + _logger.LogWarning($"Requesting service [{si.Service.Name}] faulted."); si.StatusCode = System.Net.HttpStatusCode.ServiceUnavailable; si.Response = ex.ToString(); } @@ -65,7 +63,7 @@ namespace Birdmap.API.Controllers [ProducesResponseType(StatusCodes.Status201Created)] public async Task> PostAsync(ServiceRequest request) { - _logger.LogInformation($"Creating service {request.Name}..."); + _logger.LogInformation($"Creating service [{request.Name}]..."); var created = await _service.CreateServiceAsync( _mapper.Map(request)); @@ -80,7 +78,7 @@ namespace Birdmap.API.Controllers [ProducesResponseType(StatusCodes.Status204NoContent)] public async Task PutAsync(ServiceRequest request) { - _logger.LogInformation($"Updating service {request.Name}..."); + _logger.LogInformation($"Updating service [{request.Name}]..."); var service = _mapper.Map(request); service.IsFromConfig = false;