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

@@ -5,7 +5,7 @@ using Dalamud.Interface.Internal.Notifications;
using MareSynchronos.MareConfiguration;
using MareSynchronos.MareConfiguration.Models;
using MareSynchronos.Mediator;
using MareSynchronos.Utils;
using Microsoft.Extensions.Logging;
namespace MareSynchronos.Managers;
public class NotificationService : MediatorSubscriberBase
@@ -14,7 +14,7 @@ public class NotificationService : MediatorSubscriberBase
private readonly ChatGui _chatGui;
private readonly MareConfigService _configurationService;
public NotificationService(MareMediator mediator, UiBuilder uiBuilder, ChatGui chatGui, MareConfigService configurationService) : base(mediator)
public NotificationService(ILogger<NotificationService> logger, MareMediator mediator, UiBuilder uiBuilder, ChatGui chatGui, MareConfigService configurationService) : base(logger, mediator)
{
_uiBuilder = uiBuilder;
_chatGui = chatGui;
@@ -24,7 +24,7 @@ public class NotificationService : MediatorSubscriberBase
private void ShowNotification(NotificationMessage msg)
{
Logger.Info(msg.ToString());
_logger.LogInformation(msg.ToString());
switch (msg.Type)
{