Loggerrework (#45)

* test some refactoring for cachedplayer

* rework logging

* fix saving of log level

---------

Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
This commit is contained in:
rootdarkarchon
2023-02-18 15:23:38 +01:00
committed by GitHub
parent 7f36e80e2a
commit 2ae5d42e4d
49 changed files with 676 additions and 691 deletions

View File

@@ -1,6 +1,6 @@
using MareSynchronos.API.Dto.User;
using MareSynchronos.Utils;
using Microsoft.AspNetCore.SignalR.Client;
using Microsoft.Extensions.Logging;
namespace MareSynchronos.WebAPI;
@@ -22,7 +22,7 @@ public partial class ApiController
}
catch (Exception ex)
{
Logger.Warn("Failed to Push character data: " + ex.Message);
_logger.LogWarning("Failed to Push character data: " + ex.Message);
}
}
@@ -38,7 +38,6 @@ public partial class ApiController
public async Task UserSetPairPermissions(UserPermissionsDto dto)
{
Logger.Verbose("Sending UserSetPairPermissions: " + dto);
await _mareHub!.SendAsync(nameof(UserSetPairPermissions), dto).ConfigureAwait(false);
}